[wxPython-users] Deleting a text control from an EVT_TEXT_ENTER

Anthony M. Floyd Anthony.Floyd at convergent.ca
Tue Jul 17 15:41:32 PDT 2007


Hi Andrea,

[snip]

> 
> Try to use something like:
> 
> wx.CallAfter(theTextCtrl.Destroy)
> 
> or:
> 
> wx.CallLater(200, theTextCtrl.Destroy)
> 
> It should work with wx.CallAfter, as this method is somewhat 
> supposed to wait that all the events have been processed 
> before calling the target function (Destroy()).
> 

Thanks for the suggestion.  Unfortunately, neither of these approaches
works in the sample program I attached nor in our app.  The result is
the same -- a hard crash.  Even increasing the delay in CallLater (2000
ms?!?) causes a crash.

Perhaps it's not a problem with event queuing then -- but if not, I
don't understand at all what's happening.

Thanks,
Anthony.





More information about the wxpython-users mailing list