New event system...

Xenomorph <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.wxnet
Message-ID <1083935546.6394.11.camel@dellkiste>
I have commited updates for EvtHandler to cvs. I've also checked in a
little sample, called EventDemo.

Well, it works. And we do not have to add a HashTable to EvtHandler,
because with the new system the EventListener doesn't get added to a
Frame-, Dialog-... EvtHandler.listeners but to the EvtHandler of the
window it belongs to. ( A new instance of EvtHandler is created every
time a new Window instance is created as it is the base class of all
Windows).
What we also do not need is a parameter EventType in the callback
function ForwardEvent, as we are already forwarding an Event and so we
can check its type...

For example, button.Clicked += gets added to
Button.Control.Window.EvtHandler.listeners. EVT_BUTTON on the other hand
would add it to Frame.Window.EvtHandler.listeners.

The old system ( EVT_... ) gets handled like before. So it doesn't
benefit from the new possibility to add more than one EventListener to a
control, etc...

Alexander Olk



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.