Mark Melvin wrote:
One final, related question - if you wanted to update the statusbar of the application with a message from another thread, what would be the "safe" way to do it? The only solution I can see without issuing any "GUI code" from a non-GUI thread would be to subclass to my own custom event which would call a method to add text to the statusbar, then post that custom event from the other thread, setting the event data to the message I wanted to put onto the statusbar.
Yes.
Method 2 is to set up a command queue using the python Queue class, add command objects from the threads and then call wxWakeUpIdle(). Have an EVT_IDLE handler that gets command from the queue and executes them.
Method 3 is the easiest as wxCallAfter should be safe to call from other threads (internally it does basically what you outline above.) So it would just be
wxCallAfter(theFrame.SetStatusText, theMessage)
ยทยทยท
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!