Hi,
after my VTK problem I had to switch back to wxPython 2.3.1 with
Python 2.1.1. (WIN NT 4 SP6)
Indeed the VTKRenderWindow works fine again. But now
my threads aren't working any more. I have copied the event stuff from
a posting in comp.lang.python (24-May-2001). The error message I get is:
Python error: ceval: orphan tstate
abnormal program termination
Any suggestions ?
Thanks,
Marcus
Here is the important code:
#--------------snip---------------
from wxPython.wx import *
EVT_RESULT_ID=wxNewId()
def EVT_RESULT(win,func):
win.Connect(-1,-1,EVT_RESULT_ID,func)
class ResultEvent(wxPyEvent):
def __init__(self,data,msg):
wxPyEvent.__init__(self)
self.SetEventType(EVT_RESULT_ID)
self.data=data
self.msg=msg
class MainFrame(wxFrame):
···
#------------
#somewhere in GUI frame (notify_window):
#start thread
T=threading.Thread(group=None,target=self.Worker.dowork,name=None,args=(file
name,))
T.start()
#------------
#do this when thread has finished
def OnResult(self,event):
wxEndBusyCursor()
#-----------------------
class Worker:
#somerwhere in Worker:
def dowork(self,filename):
#at the end of dowork():
wxPostEvent(self.notify_window,ResultEvent(1,'ready'))
#--------------snip---------------