Regarding
> New API proposal:
> - fl_mac_set_about(const Fl_Menu_Item *item)
> to connect an FLTK menu item to the "About myprog" application menu item

While testing the new Fl_Sys_Menu_Bar->add() and remove(), I have
discovered a most unexpected (at least by me) property of FLTK menus:
when one menu is modified, say by add() calls, the array of Fl_Menu_Items
of ANOTHER menu can be moved to a different memory place!
Thus, never memorize a pointer to Fl_Menu_Items, it can be invalidated
by uncontrolable events.

To me, this suggests that the above proposed API is not coherent with
the FLTK logic whereby Fl_Menu_Items should always be accessed through
Fl_Menu_::menu(). Shouldn't we rather use this API:
fl_mac_set_about(const char* label, int shortcut, Fl_Callback*, void 
*user_data=0, int flags=0);
that mirrors the argument list of Fl_Menu_::add()

or this other one that takes only really useful arguments:
fl_mac_set_about(Fl_Callback*, void *user_data, int shortcut=0);

I need expert advice please.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to