|
|
This is the simpliest menu declaration I would use:
Fl_Menu_Item menu_item[] = { {"name", 0, nullptr, (void*)(int_ptr)}, {0} };
The o->copy code is looking for the zero-filled item as a terminator.
Thanks a lot, I have a bit of an issue though...Here is my code (roughly, my memory isn't perfect):
Fl_Menu_Item menu_item[] = { {"name", 0, nullptr, int_ptr } }; // here int_ptr is a int* which exists for the entire duration of the program Fl_Menu_Button* o = new Fl_Menu_Button(400, 30, 40, 15); o->copy(menu_item); // < here, it crashes and complains about menu_item.size()
Do you know what this might be caused by, and how it could be fixed?
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/6ea53d4a-e7aa-4526-a2e9-db8a728ad5fcn%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |