|
|
On 3/20/24 17:53 Gonzalo Garramulo wrote:
Okay. After digging, I found what it was. I was subclassing
Fl_Text_Display and initializing its Fl_Text_Buffer in the constructor
like:
mBuffer = new Fl_Text_Buffer();
instead of calling the textdisplay->buffer() function. It turns out
textdisplay->buffer() sets a callback that counts lines when
wrap_mode() is not set to WRAP_AT_BOUNDS. Changing my code to:
Fl_Text_Buffer* buf = new Fl_Text_Buffer();
buffer(buf);
Find attached a sample program for testing.
I'm glad you found the issue.
FTR: The only thing we could do in FLTK to prevent such kinds of errors
would be to make some of the protected members private but
Fl_Text_Display is such a "beast" that I wouldn't want to open that can
of worms.
And we need to take backwards compatibility into account: reducing
visibilty from protected to private is not only an ABI breaking issue
(which we could do in 1.4.0) but it's also an API issue (breaking
contracts). Nothing we'd want to do.
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/c54e2e9b-a5d1-4115-b7b2-4a5b91f802de%40aljus.de.
[ Direct Link to Message ] | |
|
| |