I have a problem in my codebase where opening windows creates tasks, and when I close them they fail to disappear:
http://forums.degreez.net/viewtopic.php?t=4423
Here's a snippet of my code:
if (self.detailBox is not None):
try:
self.detailBox.Close ()
except wxPyDeadObjectError, e:
self.detailBox = None
self.detailBox = wxFrame(None, -1, 'Torrent Details ', size = wxSize(405,230),
style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
try:
self.detailBox.SetIcon(self.icon)
except:
pass
panel = wxPanel(self.detailBox, -1, size = wxSize (400,220))
...
def closeDetail(evt, self = self):
self.detailBox.Close()
EVT_BUTTON(self.detailBox, okButton.GetId(), closeDetail)
def kill(evt, self = self):
self.detailBox.Destroy()
self.detailBox = None
self.fileList = None
self.dow.filedatflag.clear()
EVT_CLOSE(self.detailBox, kill)
...
self.detailBox.Show ()
border.Fit(panel)
self.detailBox.Fit()
This behavior seems to have sprung up only with the latest Python/wxPython. Is there any difference in the new wxPython I need to account for?