> On 31.03.2011 17:16, Joe wrote: > > > I'm quite new in developing with fltk and I have found a problem I can't > > solve... > > I have a thread in my program that computes some data that should be shown > > on the main window. > > There are other mechanisms like timeouts and idle methods that > let you do something like this w/o threads. In some cases this might > be easier at the additional gain that it will probably be more > portable. > > > However, the data is only updated if I move the mouse over the window or I > > keep pressing Alt. Does anyone knows how can I fix this? I know it sounds > > weird... > > It's not weird if you are not using the threads as you should. > It is all documented here: > > http://www.fltk.org/doc-1.3/advanced.html > > Especially this: "From within a thread (other than the main thread) > FLTK calls must be wrapped with calls to Fl::lock() and Fl::unlock()" > .... may be important for you. > > And this, too: "FLTK supports multiple platforms, some of which allow only > the main thread to handle system events and open or close windows. The safe > thing to do is to adhere to the following rules for threads on all operating > systems: ..." (see last paragraph at the link above). > > > More info: Dev-C++ in a Windows 7. > > Thanks, but the most important information is missing: > Which FLTK version? > > Albrecht
Thank you for your answer. You were right, I forgot an important info: I'm using FLTK v 1.1.10. I began to use pthreads for win32, but using threads as in the example the results are the same. I will keep on trying, there's something i'm doing wrong, since it's the first time I work with threads. Thanks again! p _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

