Extending Events

Lee McColl-Sylvester lee.mccoll at lyons-group.co.uk
Fri Aug 4 05:03:29 PDT 2006


Hi Hans,

 

Can you at least give a tiny example how I would pass data to an event
type before calling the EvtHandler::Connect function?

 

Thanks,

Lee

 

 

 

________________________________

From: Hans Harmon [mailto:hans_harmon at yahoo.com] 
Sent: 04 August 2006 12:47
To: wx-users at lists.wxwidgets.org
Subject: Re: Extending Events

 

I would recommend looking at EvtHandler::Connect as this has solved some
of my needs for dynamic events, without needing the macro table.  You
should be able to use the UserData pointer to pass whatever else you
need for the event callback to work properly.  Unfortunately I do not
have any examples (that I can post), especially doing this with a
scripting language.

Hans

Lee McColl-Sylvester <lee.mccoll at lyons-group.co.uk> wrote:

Hi List,



I'm intending on using wxWidgets to provide GUI support for a scripting
language, but I'm having trouble working out how best to support events.
I know that wxPython extends the event objects, but how do they then get
the widgets to send the events with the extended data?



For example, normally one would register an event and supply a function
pointer using the event table macros, but this won't be possible in my
cercumstance. I'm gonna need to register the event dynamically, passing
not only a function call but also various parameters that the function
will need to be able to proxy the event back to the scripting language.



Does anyone on this list have experience with this? Do you know of any
examples I can look at?



Regards,

Lee







---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wx-users-help at lists.wxwidgets.org

 

 __________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20060804/3e7d3a50/attachment.htm


More information about the wx-users mailing list