>
> On 02.07.2011, at 20:07, GM wrote:
>
> >     wi_cli->add(value.c_str());
>
> c_str() returns a temporary variable. Fl_Widget however needs a pointer =
> to a variable that is allocated as long as the browser is around. This =
> would work:
>
> >=20
> >     wi_cli->add(strdup(value.c_str()));
>
>
> but you need to make sure to deallocate the strings when you change =
> entries or delete the browser.
>
>
>

thank you so far but this did not solve the problem. Even when i ry 
wi_cli->add("Test") the program crashes. But there is another strange 
behaviour. When i call wi_cli("some text") in another function in my class 
there is no problem and then i can add a lot of more lines.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to