> Well, I ran ./configure --enable-threads. Then make clean, > make, make install.
I'd caution against ever installing, especially from a tree you are experimenting on. Instead, use fltk from the build tree directly. Leverage fltk-config in your build files to do that, it allows you to compile/link directly from the fltk tree easily. > afterwards just tried to use the app and > it worked except for the browser with multiple columns, there > was a bunch of garbage in some of the columns. I then just > ran ./configure and then rebuilt again, and it worked fine. > Is the fact that I didn't call Fl::lock() the problem? > > Also, when should lock be called, I mean I'm going to fire > off a thread (just the one), then as part of that other > thread I'm going to change values of widgets > (labels/progress/etc..) and setup a timer sitting in wait() > loop. Do I need lock in those cases? Or just if I'm going > to create other windows in the other thread? You must call lock() just once in the entry code before you spawn your extra threads, IF the extra thread is going to make any access to fltk widgets at all. If the other thread does never access any fltk widget, then the lock is not required. You CAN NOT create any new windows from the "child" threads, and this includes any widget that derives from Fl_Window or uses it's own private window (e.g. the fl_ask style dialog boxes etc...) This is a constraint imposed by several of the windowing systems we strive to support - notably WinXP and earlier (and I think Vista and Win7 too?) will often take the hump if you create a new window from any thread other than the main thread of a process. (Though note that the form of this "hump-taking" can be quite subtle and obscure leading to really weird bugs appearing in odd places..) Actually - is this not in the docs now? I thought that it was. Anyway, if you need to create new windows or etc from a child thread, use the awake callback mechanism, that allows you to (in effect) have the main thread run a callback for your child threads, allowing for window creation/deletion etc without breaking the underlying OS implementation. 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

