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
This commit is contained in:
Vadim Zeitlin 2009-02-01 21:15:50 +00:00
parent 6dbf7a3750
commit 6c5e1aa764

View 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,