Hi All,
I am the following error on destroying a dialog with GenricDirCtrl object.
####################code##############################
self.genericDirCtrl1 = wx.GenericDirCtrl(defaultFilter=0, dir='.',
filter="All files (*.*)|*.*|PDF files (*.pdf)|*.pdf",
id=wxID_DIALOG1GENERICDIRCTRL1, name='genericDirCtrl1',
parent=self.panel8, pos=wx.Point(47, 0), size=wx.Size(256, 176),
style=wx.DIRCTRL_SHOW_FILTERS | wx.DIRCTRL_3D_INTERNAL | wx.SUNKEN_BORDER)
self.treeCtrl1=self.genericDirCtrl1.GetTreeCtrl()
self.treeCtrl1.Bind(wx.EVT_TREE_SEL_CHANGED,
self.OnTreeCtrl1TreeSelChanged)
I fixed it by setting the event to None on close.
···
#################################
################Error#############
Traceback (most recent call last):
File "E:\XXXX\gui\wxDialogAccPayable.py"
, line 1158, in OnTreeCtrl1TreeSelChanged
fullFilepath=self.genericDirCtrl1.GetPath();
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py", line
5673, in GetPath
return _controls_.GenericDirCtrl_GetPath(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "stringSrc.GetStringData()->IsValid()"
failed at ..\..\src\common\string.cpp(775) in wxStringBase::operator`='()
2008-07-18 15:25:47
Traceback (most recent call last):
File "E:\XXXX\gui\wxDialogAccPayable.py"
, line 1158, in OnTreeCtrl1TreeSelChanged
fullFilepath=self.genericDirCtrl1.GetPath();
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 1450
4, in __getattr__
raise PyDeadObjectError(self.attrStr % self._name)
wx._core.PyDeadObjectError: The C++ part of the GenericDirCtrl object has been d
eleted, attribute access no longer allowed.
########################################
cheers
Thomas