Consider a fluid class containing an Fl_Input_Choice widget. If this widget has 
Fl_Menu_Item-s that have their own callbacks then these will crash the program.

Reason is that Fl_Input_Choice itself is a group containing an FL_Input and a 
Fl_Menu_Button. It is the latter component that executes its menu item 
callbacks on their behalf.

Fluid generated callbacks find their class instance using repeated "->parent()" 
calls. Because Fl_Input_Choice adds an other group to the hierarchy, the fluid 
generated callback will access the wrong object.

I can post a patch to fix this, but we need to decide where to fix it.

Option 1: Fix it in fluid so that for Fl_Input_Choice menu item callbacks it 
adds one more "->parent()".

Option 2: Fix it in Fl_Input_Choice so that its own subclassed version of 
Fl_Menu_Button passes up menu item callbacks to its parent.
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to