On 09.01.2008, at 11:28, German wrote:

> hi i'm trying redraw o refresh (Fl_Multiline_Output) widget values,  
> but doesnt work, when i press Enter to call the callback  
> "txt_code_cb" to display the messages on (Fl_Multiline_Output)  
> "out_logs" only show the last message, i try with out_logs->redraw()  
> but doesn't work.

The "sleep()" command does not work very well in a user interface  
environment which must be prepared to handle all kinds of system and  
user requests at any time.

Please avoid using sleep() wherever possible. If you need timeouts,  
please look at the FLTK function Fl::add_timeout() and friends.

If you *must* use sleep(), please make sure to regularly update the  
display by calling Fl::flush() between short sleep() statements. If  
your application must use sleep() for longer periods of time, you  
should also handle messages regularly. this can be done by calling  
sleep(1); folowed by Fl::wait(0.0); which gives the UI a chance to  
stay somewhat responsive.

In your particular example though, you should really use add_timeout()  
or maybe no timers at all.

Matthias

----
http://robowerk.com/


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to