I'm learning wxWidgets and would like to know which event, connect or using static event tables? Why will you choose one from the other

I'm learning wxWidgets and would like to know which event, connect or using static event tables? Why will you choose one from the other

Which of the two types of event system you guys suggest? Is it using EVENT TABLE or CONNECT?

Thanks alot

I personally generally use an EVENT_TABLE if I have a large number of events for a class ( > 5 or so), but if I only have 1 or 2 I generally use Connect (or I have a complicated gui, lots of enabling/disabling etc). I've just found it to look cleaner: prevents a ridiculous amount of event tables but if there's a ton of events it's easier to keep them straight in an event table. That's my preference, there are some different things that can be done with connect so it's not a straight substitute either way, but if you want something more than that, here's explaining the subtle differences:

http://wxwidgets.blogspot.com/2007/01/in-praise-of-connect.html

Also, another interesting bit of info is that in my wxwidgets book, written by the creators, all of their examples (that I've seen) use event tables. It's possible that there's performance differences (significant I mean) since event tables are static routing and connect is dynamic but I have yet to see anything definitive so I'm going by what I like :)

hope that's helpful

~J

commented: Good post +18
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.