Re: C++ button events

"Brendan Simon (eTRIX)" <[email protected]> Sun, 30 Jun 2019 23:51:01 +1000
Newsgroups gmane.comp.python.wxglade
Organization eTRIX pty ltd
Message-ID <[email protected]>
I tried specifying an ID for the button in wxglade.  It generated code
to specify the button and put it in the event table, but the generation
event handler still has the event.Skip() code and all the other button
event handlers get called.  Is this because the event handlers aren't
virtual in the wxglade generated code?

Thanks, Brendan.

------------------------------------------------------------------------

On 30/6/19 11:36 pm, Brendan Simon (eTRIX) wrote:
> Hi,
>
> I've got a demo program that needs to be written in C++.  It has 5
> buttons.
>
> If generating Python bindings with wxglade, each button has it's own
> event handler and only the one event handler gets called.
>
> However, the C++ generated code builds a table with wxID_ANY and each
> event handler has a call to Skip().  So running the built app I get 5
> lines of output saying it's not implemented (one for each default
> button handler).
>
> Is there a way to make the C++ work more like python code and only
> call the one method (corresponding to the clicked button)?  I really
> don't want to maintain window IDs for each button (it seems so
> unncessary and I don't know how to do that in wxglade - if it's event
> possible).
>
> Also, the C++ code generated does not generate virtual methods. 
> Shouldn't it generate virtual methods so they can be overridden by a
> derived class?
>
> That's how I design my software with python, and I figured that C++
> should do the same (well for my way of thinking at least).
>
> Thanks, Brendan.

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