From 6c5e1aa764f7ae5b47bd08f5e820b409f7b7eae9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 1 Feb 2009 21:15:50 +0000 Subject: [PATCH] emphasize that you need to specify eventSink when connecting to a different object method git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/event.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/interface/wx/event.h b/interface/wx/event.h index 238369e533..0a7e0a54ef 100644 --- a/interface/wx/event.h +++ b/interface/wx/event.h @@ -462,10 +462,20 @@ public: //@{ /** - Connects the given function dynamically with the event handler, id and event type. - This is an alternative to the use of static event tables. + Connects the given function dynamically with the event handler, id and + event type. - See the @ref page_samples_event sample for usage. + This is an alternative to the use of static event tables. It is more + flexible as it allows to connect events generated by some object to an + event handler defined in a different object of a different class (which + is impossible to do directly with the event tables -- the events can be + only handled in another object if they are propagated upwards to it). + Do make sure to specify the correct @a eventSink when connecting to an + event of a different object. + + See @ref overview_eventhandling_connect for more detailed explanation + of this function and the @ref page_samples_event sample for usage + examples. This specific overload allows you to connect an event handler to a @e range of @e source IDs. @@ -490,8 +500,9 @@ public: @param userData Data to be associated with the event table entry. @param eventSink - Object whose member function should be called. - If this is @NULL, @c *this will be used. + Object whose member function should be called. It must be specified + when connecting an event generated by one object to a member + function of a different object. If it is omitted, @c this is used. */ void Connect(int id, int lastId, wxEventType eventType, wxObjectEventFunction function,