X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14eb37a05eb3741f4c8d9e64b7af45480706cb15..12b5f4b4d2d8a07962da7ba3b78c8c1ec2634a67:/src/common/appbase.cpp diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index b2a0fd718f..740deebb2b 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -243,7 +243,7 @@ int wxAppConsoleBase::OnExit() #if wxUSE_CONFIG // delete the config object if any (don't use Get() here, but Set() // because Get() could create a new config object) - delete wxConfigBase::Set((wxConfigBase *) NULL); + delete wxConfigBase::Set(NULL); #endif // wxUSE_CONFIG return 0; @@ -416,6 +416,20 @@ wxAppConsoleBase::HandleEvent(wxEvtHandler *handler, (handler->*func)(event); } +void wxAppConsoleBase::CallEventHandler(wxEvtHandler *handler, + wxEventFunctor& functor, + wxEvent& event) const +{ + // If the functor holds a method then, for backward compatibility, call + // HandleEvent(): + wxEventFunction eventFunction = functor.GetMethod(); + + if ( eventFunction ) + HandleEvent(handler, eventFunction, event); + else + functor(handler, event); +} + void wxAppConsoleBase::OnUnhandledException() { #ifdef __WXDEBUG__