Modal dialogs and threads on Mac OS X with wxPython 3.0
I'm attaching a wxPython test which works for me on wxPython 2.8 on Mac OS X but fails on wxPython 3.0 on Mac OS X. The attached code attempts to illustrate a problem I'm having in a much larger application. Basically, after a modal dialog session has ended, I can no longer use wx.CallAfter effectively to post events to the main thread.
What I expect to see, (assuming that I click the OK button when it appears), and what I see with wxPython 2.8 is:
And then after sleeping for 5 seconds, the program exits when using wxPython 2.8.
But with wxPython 3.0, the program never exits and never displays the final line of text - it appears to freeze up when wx.CallAfter is called from testWorker2:
testWorker1: Writing stdout from TestWorker1Thread testWorker1: Writing stdout from MainThread.
TestDialog returned wx.ID_OK. Thread is MainThread
testWorker2: Writing stdout from TestWorker2Thread
Notice the missing "testWorker2:Writing stdout fromMainThread" in the wxPython 3.0 output.
Is this a bug, or am I doing something wrong?
The sleep times in the code are a bit arbitrary - I'm just trying to give the application enough time to start up its main loop before attempting to exit.
For the successful wxPython 2.8 test, I used: Python 2.7.9 (32-bit), wxPython 220.127.116.11, Mac OS X 10.9
For the unsuccessful wxPython 3.0 test, I used: Python 2.7.8 (32-bit/64-bit), wxPython 18.104.22.168, Mac OS X 10.7
Thanks in advance,
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.