> It is early days for me and i need to see how to properly 
> embed my code in an event loop, because i asked a for loop to 
> output a count using the method we have discussed, the thing 
> is if i put a high count in the window hangs and does not 
> display until the count is complete, even though the show() 
> function was already called in the constructor,

Yup - that's something that many people trip over when getting into GUI
programming.

If you make a tight loop that doesn't yield the process to the GUI at
any point, the GUI will not be redrawn, so...

It's tricky, and requires you to think about coding the problem
differently from what you might do in a simple case.
Generally, long processes that occur in the same thread as the GUI are
anathema - you need to find another way.

The GUI updates can be pumped "synchronously" from inside your loop by
calling Fl::check(); every few hundred iterations, but that's actually a
pretty poor solution to the problem.

A better approach would be to do it asynchronously, either via threading
or by use of the Fl timeout methods to update things suitably.

There are examples out there, of course, I think Greg's site has a few
for example, so I'm sure you'll find what you need.




SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to