diff --git a/docs/doxygen/overviews/eventhandling.h b/docs/doxygen/overviews/eventhandling.h index 54acd96d02..6b1607bb07 100644 --- a/docs/doxygen/overviews/eventhandling.h +++ b/docs/doxygen/overviews/eventhandling.h @@ -453,14 +453,19 @@ doesn't count as having handled the event and the search continues): Bind<>() was called, is consulted. Notice that this is done before checking the static event table entries, so if both a dynamic and a static event handler match the same event, the static one is never going to be - used unless wxEvent::Skip() is called in the dynamic one. + used unless wxEvent::Skip() is called in the dynamic one. Also note that + the dynamically bound handlers are searched in order of their registration + during program run-time, i.e. later bound handlers take priority over the + previously bound ones.
  • The event table containing all the handlers defined using the event table - macros in this class and its base classes is examined. Notice that this - means that any event handler defined in a base class will be executed at - this step. + macros in this class and its base classes is examined. The search in an + event table respects the order of the event macros appearance in the source + code, i.e. earlier occurring entries take precedence over later occurring + ones. Notice that this means that any event handler defined in a base class + will be executed at this step.
  • diff --git a/interface/wx/event.h b/interface/wx/event.h index a736f9f12b..8426e63750 100644 --- a/interface/wx/event.h +++ b/interface/wx/event.h @@ -595,11 +595,13 @@ public: -# If the object is disabled (via a call to wxEvtHandler::SetEvtHandlerEnabled) the function skips to step (7). -# Dynamic event table of the handlers bound using Bind<>() is - searched. If a handler is found, it is executed and the function + searched in the most-recently-bound to the most-early-bound order. + If a handler is found, it is executed and the function returns @true unless the handler used wxEvent::Skip() to indicate that it didn't handle the event in which case the search continues. -# Static events table of the handlers bound using event table - macros is searched for this event handler. If this fails, the base + macros is searched for this event handler in the order of appearance + of event table macros in the source code. If this fails, the base class event table is tried, and so on until no more tables exist or an appropriate function was found. If a handler is found, the same logic as in the previous step applies.