Forwarding child events to a top level window

Vadim Zeitlin vadim at wxwidgets.org
Fri Aug 3 04:24:41 PDT 2007


On Thu, 2 Aug 2007 21:35:35 -0700 Randy Sales <randy.sales at impinj.com> wrote:

RS> Vadim, thanks for the info.  Actually, my second question was the most
RS> important.
RS> ...
RS> 2) Are there any issues with attaching a data object to the event before
RS> passing it on, as I have done in this example?  I could find no
RS> documentation or mail stating what's valid.  Is there a good source of
RS> info for this type of question?

 It's not a good idea to modify an existing event object like this: it
might already contain its own client data (associated with the control
which generated the event). If you replace it with your own, the original
data is lost. Also, as I said, you shouldn't be having this forwarding
function anyhow as this is done automatically, so why bother?

 I don't know what exactly are you doing but it looks like you want to
catch the original command event in your control class and from there
generate another, custom, event containing your extra data.

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list