AUI error: any pushed event handlers must have been removed
Al Goor <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
I'm trying to work with AUI and keep getting the following error...
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed
at
/usr/local/miniconda/conda-bld/wxpython_1585592756259/work/ext/wxWidgets/src/common/wincmn.cpp(478)
in ~wxWindowBase(): any pushed event handlers must have been removed
I've reduced my code down to a simple program that reproduces the error
(below). Please note that the "MyFrame" definition is auto-generated by
wxFormBuilder, so I'm only supposed to modify that through subclasses.
I've found references to this error on the internet, but none of the
solutions seem to match my case.
Where am I going wrong?
Thanks,
Eric
import wx
import wx.xrc
import wx.aui
# Code for the frame was auto-generated by wxFormBuilder
class MyFrame1(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=wx.EmptyString,
pos=wx.DefaultPosition,
size=wx.Size(870, 700), style=wx.DEFAULT_FRAME_STYLE
| wx.TAB_TRAVERSAL)
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
self.m_mgr = wx.aui.AuiManager()
self.m_mgr.SetManagedWindow(self)
self.m_mgr.SetFlags(wx.aui.AUI_MGR_DEFAULT)
self.m_mgr.Update()
self.Centre(wx.BOTH)
def __del__(self):
self.m_mgr.UnInit()
class MyApp(wx.App):
def OnInit(self):
self.frame = MyFrame1(None)
self.SetTopWindow(self.frame)
self.frame.Show(True)
return True
#
-------------------------------------------------------------------------------
def main():
app = MyApp(False)
app.MainLoop()
#
-------------------------------------------------------------------------------
if __name__ == "__main__":
main()
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/58132bb2-cb42-4891-9a4b-f1d18a529e80%40googlegroups.com.