Bug in frame event close code gen

"Brendan Simon (eTRIX)" <[email protected]> Thu, 3 Oct 2019 15:01:26 +1000
Newsgroups gmane.comp.python.wxglade
Organization eTRIX Services
Message-ID <[email protected]>
I think I've found a bug in the python code generation for frame event 
close.

If I set the `EVT_CLOSE` to `on_close` the following code is generated.

self.Bind(wx.EVT_CLOSE, self.on_close, self.main_frame_wxg)

When running the app I get the follwing error.

   File "D:\Brendan\Main_Frame_WXG.py", line 102, in __init__
     self.Bind(wx.EVT_CLOSE, self.on_close, self.main_frame_wxg)
AttributeError: 'Main_Frame' object has no attribute 'main_frame_wxg'
OnInit returned false, exiting...


Replacing `main_frame_wxg` with `self` fixes the issue for me.

self.Bind(wx.EVT_CLOSE, self.on_close, self)


Regards, Brendan.

_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxglade-general