Forwarding child events to a top level window

Randy Sales randy.sales at impinj.com
Fri Aug 3 09:22:15 PDT 2007


Vadim, good point about accessors being more appropriate, I will
consider.  Thanks much for your help.

- Randy

-----Original Message-----
From: Vadim Zeitlin [mailto:vadim at wxwidgets.org] 
Sent: Friday, August 03, 2007 9:14 AM
To: wx-users at lists.wxwidgets.org
Subject: Re[4]: Forwarding child events to a top level window
Importance: Low

On Fri, 3 Aug 2007 08:46:34 -0700 Randy Sales <randy.sales at impinj.com>
wrote:

RS> I agree with your concern about modifying existing event data, hence
my
RS> question.  I suppose I could define a custom event and forward that
RS> instead, or maybe clone the original event, but the event as
provided
RS> has a NULL data object and seemed liked a reasonable vehicle for the
RS> control-specific information.

 I don't say that what you do doesn't work (it probably does) but it
doesn't seem elegant to me to generate 2 "duplicate" events like this.
Also, having a custom event class would allow you to add convenient
accessors for the extra data while with your approach you have to
extract
the client data with a cast.

RS> Regarding what I'm really trying to accomplish with this approach, I
RS> need to catch the original event in the control first because the
RS> control has information needed by the top level app.  The control
must
RS> forward the information onto the top level app, where it will use
the
RS> information in concert with information from other controls.  So the
app
RS> is acting as a control-spanning entity and must be the final
recipient
RS> of the event, but only after the event has been populated with
RS> control-specific information.

 All I can say is repeat that for me this really calls for a
control-specific event.

 Regards,
VZ

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


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





More information about the wx-users mailing list