Daniel Gollas wrote:
> This indeed seems like a good workaround, although I tried it and
> had some segmentation faults when using non constant labels.
Yes, label() always expects you to maintain the string's memory
by default.
For non-const strings, you need to make sure the memory
for the string remains allocated, and does not go out of scope,
as fltk does not make a copy of it.
The only fltk label() method I know of that manages string memory
for you is copy_label():
http://fltk.org/documentation.php/doc-1.1/Fl_Widget.html#Fl_Widget.copy_label
..which may not even be available in an Fl_Menu_Item.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk