I think I can answer my question. It is the expected behavior since the menu_
might require a realloc when a new item is added.
I think one should access all menu items using find_item to handle for such
cases.
Oguz
> Hello,
>
> I would like to add a new menu item to an existing menu using Fl_Menu_::add
> function. But I realized that this function changes the menu_ member. For
> example:
>
> cout << "before add: " << menubar->menu() << endl; // menubar is of type
> Fl_Menu_Bar
> menubar->add("Hey", 0, 0, 0, 0);
> cout << "after add: " << menubar->menu() << endl;
>
> The output is something like:
>
> before add: 0x082b8b20
> after add: 0x085b8b20
>
> Is this the expected behavior?
>
> Thanks,
> Oguz
>
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk