]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
Forgot header with OSX prefix
[wxWidgets.git] / src / common / appbase.cpp
index b2a0fd718f7df4e5d2ab46050c2cdf0400f4e268..740deebb2b4b221369d1e0e38b48c13061ae7fd6 100644 (file)
@@ -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__