In Dabo I get this exception:
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\searchbox.py", line 245, in <module>
test.Test().runTest(testParms)
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\test.py", line 76, in runTest
self.app.start()
File "c:\dev\dabo - phoenix\dabo\dApp.py", line 402, in start
self.uiApp.start()
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\uiapp.py", line 464, in start
self.MainLoop()
File "c:\Python27\Lib\site-packages\wx-3.0.0-msw-phoenix\wx\core.py", line 1873, in MainLoop
rv = wx.PyApp.MainLoop(self)
File "c:\Python27\Lib\site-packages\wx-3.0.0-msw-phoenix\wx\core.py", line 2888, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\menu.py", line 337, in remove
id_ = item.GetId()
RuntimeError: wrapped C/C++ object of type dMenuItem has been deleted
line 334 to 337 are:
if not item:
# Menuitem has already been destroyed
return
id_ = item.GetId()
Is the __nonzero__ magic not applied to menu items?
In Dabo I get this exception:
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\searchbox.py", line 245, in
<module>
test.Test().runTest(testParms)
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\test.py", line 76, in runTest
self.app.start()
File "c:\dev\dabo - phoenix\dabo\dApp.py", line 402, in start
self.uiApp.start()
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\uiapp.py", line 464, in start
self.MainLoop()
File "c:\Python27\Lib\site-packages\wx-3.0.0-msw-phoenix\wx\core.py",
line 1873, in MainLoop
rv = wx.PyApp.MainLoop(self)
File "c:\Python27\Lib\site-packages\wx-3.0.0-msw-phoenix\wx\core.py",
line 2888, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\menu.py", line 337, in remove
id_ = item.GetId()
RuntimeError: wrapped C/C++ object of type dMenuItem has been deleted
line 334 to 337 are:
if not item:
# Menuitem has already been destroyed
return
id_ = item.GetId()
Is the __nonzero__ magic not applied to menu items?
It probably could be, I'll look into it. Where is the item coming from? Was it the original item created when added to the menu or a new instance fetched from the event or menu by id or something?
This is happening when a menu item is being removed, some clean up is done in Dabo and then wx.Menu.RemoveItem(self, item) is being called, but for some reason this is sometimes called when item/menu has already been removed.
Werner
···
On 10/01/2014 11:46, Robin Dunn wrote:
Werner wrote:
Hi,
In Dabo I get this exception:
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\searchbox.py", line 245, in
<module>
test.Test().runTest(testParms)
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\test.py", line 76, in runTest
self.app.start()
File "c:\dev\dabo - phoenix\dabo\dApp.py", line 402, in start
self.uiApp.start()
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\uiapp.py", line 464, in start
self.MainLoop()
File "c:\Python27\Lib\site-packages\wx-3.0.0-msw-phoenix\wx\core.py",
line 1873, in MainLoop
rv = wx.PyApp.MainLoop(self)
File "c:\Python27\Lib\site-packages\wx-3.0.0-msw-phoenix\wx\core.py",
line 2888, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "c:\dev\dabo - phoenix\dabo\ui\uiwx\menu.py", line 337, in remove
id_ = item.GetId()
RuntimeError: wrapped C/C++ object of type dMenuItem has been deleted
line 334 to 337 are:
if not item:
# Menuitem has already been destroyed
return
id_ = item.GetId()
Is the __nonzero__ magic not applied to menu items?
It probably could be, I'll look into it. Where is the item coming from? Was it the original item created when added to the menu or a new instance fetched from the event or menu by id or something?