> 3. When the add menu item is clicked, a new button appears, but has garbage 
> text.

Garbage text sounds like a well known problem:

>      void set( string str ) { label(str.c_str()); }

label() doesn't copy the string (but there is a copy_label()), but just 
saves the given const char*. But your string is local, so the content 
vanishs fast. There are several solutions, most easy seems to be:

void set( string str)
        delete[] label();

or a local string as class member:

void set( string str)
        my_Label= str;
fltk mailing list

Reply via email to