Creating custom events - Event Handling Overview vs. wxFormBuilder

Lars Uffmann aral at nurfuerspam.de
Wed Feb 20 05:15:21 PST 2008


Vadim Zeitlin wrote:
> LU> And this overview starts talking about macros (DECLARE_EVENT_TYPE, 
> LU> DEFINE_EVENT_TYPE, BEGIN_EVENT_TABLE, END_EVENT_TABLE) which is really 
> LU> confusing me:
>  Don't use them then.
K, I wasn't sure what "the way to go" is, because the documentation 
seemed to be suggesting that was it.

>  I am certainly confused. You use Connect() for _connecting_ event
> handlers, i.e. instead of BEGIN_EVENT_TABLE/EVT_XXX/END_EVENT_TABLE. But it
> has nothing to do with defining new events i.e. DECLARE/DEFINE_EVENT_TYPE.
> Why do you compare them?

Forgive my limited understanding of the connections - I have tried to 
read documentation, but I am definitely a learning by doing type of 
person, and I failed to make much out of what documentations I have 
found. I am using wxwidgets.org documentation as a reference, but in 
many cases there's just not enough information for my taste to fully 
understand how things work. I started speaking about Connect() because I 
thought that it connects an event handler not only to a control, but 
also to a specific event - just like the event table.

> LU> Is it deprecated style to Connect() events?
>  No. See
Thank you.

> The event overview does mention Connect(), although it should probably do
> it more prominently. However I have the impression that you want it to be
> mentioned in the section about defining new events and it has simply
> nothing to do with it.
Which is probably just because I'm not grasping the concept of events 
yet. Namely the difference between event types and event IDs, and how 
that affects handling them.

Sorry - but this is the only place where I seem to be able to go to make 
some progress on some of my problems - while I'm solving the bigger 
amount with debugging and trial-and-error. It's just not easy to get 
started with wxWidgets.

Best Regards,

    Lars






More information about the wx-users mailing list