]> git.saurik.com Git - wxWidgets.git/commitdiff
emphasize that you need to specify eventSink when connecting to a different object...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 1 Feb 2009 21:15:50 +0000 (21:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 1 Feb 2009 21:15:50 +0000 (21:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

interface/wx/event.h

index 238369e5336134e4887c1abf47a3a0f646280aa3..0a7e0a54ef84a5ad0ad5786e7ea48ba8ed1c2e7e 100644 (file)
@@ -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,