small problem with a thread

thanks, yes that is what I would have thought but the window still exists… I’m assuming if its destroyed I wouldn’t be able to see it?

Jeff

···

Robin Dunn robin@alldunn.com wrote:

Jeff Peery wrote:

hello I’m having a small problem with a simple thread I created. I use
the thread to update a gauge while I load some data into my program.
anyhow here is the error I am getting:

typeError: arguement number 1: a ‘wxEvtHandler*’ is
expected.‘_wxPyDeadObject(wxPython wrapper for DELETED ProgressGauge
object! (the C++ object no longer exists.))’ is received

And below is basically the thread part of my program. any ideas what
might cause this error? thanks.

Exactly what it says above. The window you are using in your
wx.PostEvent call
has been destroyed when you try to use it. You can
protect against this by checking the window with an if statement,
something like this:

if self._notify_window:
wx.PostEvent(self._notify_window, ResultEvent(None))

But it might be better to find out why the window is being destroyed
before you expect it to be.


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


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org


Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.