Hi, I am migrating an application from FLTK 1.1.3 to FLTK 1.1.9.
The problem is the following
I have a button whose callback deletes the button itself.
It works fine in 1.1.3, since the code for Fl_Widget::do_callback is the
following:
void do_callback() {callback_(this,user_data_);}
But in 1.1.9 that code changed to:
void do_callback() {callback_(this,user_data_); if (callback_ !=
default_callback) clear_changed();}
So, the instruction clear_changed() executes after the object was destroyed,
causing a crash.
The question is, isn't valid to delete a widget in its callback?
In such case, what would you suggest doing?
Thanks very much
David.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk