Mac and threads

Folks

While trying to discover why my App is doing its event handling in a thread that is not the main GUI thread I discovered that the demo behaves very differntly on the Mac. If I click on the Threads demo and then "Show Threads sample" button on Linux machines the main window is frozen. On the Mac I can click on PythonEvents with the following errors.

Unhandled exception in thread started by
Traceback (most recent call last):
  File "Threads.py", line 38, in Run
    wx.PostEvent(self.win, evt)
  File "/net/patchnose/scratch1/nigel/phenix-1.3b/build/mac-intel-osx/base/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_core.py", line 7537, in PostEvent
    return _core_.PostEvent(*args, **kwargs)
TypeError: in method 'PostEvent', expected argument 1 of type 'wxEvtHandler *'
Unhandled exception in thread started by
Traceback (most recent call last):
  File "Threads.py", line 38, in Run
    wx.PostEvent(self.win, evt)
  File "/net/patchnose/scratch1/nigel/phenix-1.3b/build/mac-intel-osx/base/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_core.py", line 7537, in PostEvent
    return _core_.PostEvent(*args, **kwargs)
TypeError: in method 'PostEvent', expected argument 1 of type 'wxEvtHandler *'
Unhandled exception in thread started by
Traceback (most recent call last):
  File "Threads.py", line 38, in Run
    wx.PostEvent(self.win, evt)
  File "/net/patchnose/scratch1/nigel/phenix-1.3b/build/mac-intel-osx/base/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_core.py", line 7537, in PostEvent
    return _core_.PostEvent(*args, **kwargs)
TypeError: in method 'PostEvent', expected argument 1 of type 'wxEvtHandler *'
Unhandled exception in thread started by
Traceback (most recent call last):
  File "Threads.py", line 38, in Run
    wx.PostEvent(self.win, evt)

Nigel

···

---
Nigel W. Moriarty

____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

Nigel W. Moriarty wrote:

Folks

While trying to discover why my App is doing its event handling in a thread that is not the main GUI thread I discovered that the demo behaves very differntly on the Mac. If I click on the Threads demo and then "Show Threads sample" button on Linux machines the main window is frozen. On the Mac I can click on PythonEvents with the following errors.

Thanks

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!