[wxPython-dev] Problem with MenuItem.Destroy()
Paul McNett
p at ulmcnett.com
Mon Dec 18 09:50:27 PST 2006
Paul McNett wrote:
> Sorry, I don't have time right now to build and test with the preview,
> but this happens in wxPython 2.7.2 at least.
>
> Modify the example for Menu.py as follows:
>
> --- Menu.py.orig 2006-12-08 11:49:41.000000000 -0800
> +++ Menu.py 2006-12-08 11:48:39.000000000 -0800
> @@ -81,6 +81,8 @@
> item = wx.MenuItem(menu5, 500, "&Smile!\tCtrl+S", "This one has
> an icon")
> item.SetBitmap(images.getSmilesBitmap())
> menu5.AppendItem(item)
> + menu5.RemoveItem(item)
> + item.Destroy()
>
> # Shortcuts
> menu5.Append(501, "Interesting thing\tCtrl+A", "Note the
> shortcut!")
>
>
> The call to item.Destroy() causes a segfault. This wasn't the case in
> wx2.6.
Is nobody able to reproduce this? I'm wondering if this is a new class
of problems in wx2.7 because I'm getting segfaults and illegal
operations in various places - this was just one place I tracked down.
It is keeping Dabo from being able to announce support for wx2.7/2.8.
I'll try to get some time to compile and test with the latest preview
sometime soon, but in the meantime can somebody confirm/deny the
existence of the problem with wx.MenuItem.Destroy()?
Thanks!
Paul
--
pkm ~ http://paulmcnett.com
More information about the wxpython-dev
mailing list