Re: Bug in frame event close code gen

Dietmar Schwertberger <[email protected]> Thu, 3 Oct 2019 19:59:13 +0200
Newsgroups gmane.comp.python.wxglade
Message-ID <[email protected]>
On 03.10.2019 07:01, Brendan Simon (eTRIX) wrote:
>
> 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)

Thanks for reporting. As previous versions did not support events for 
toplevel objects, there were no test cases and so I did not see this.

I will need a while to fix this, as I want to unify it over the 
supported languages.

For Python-only, you can patch yourself:

In wcodegen/__init__.py replace one line around line #625:

         if self.use_names_for_binding_events:
             #win_id = self.codegen.add_object_format_name(obj.name)
             win_id = "#" + self.format_widget_access(obj)

Regards,

Dietmar

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