]> git.saurik.com Git - wxWidgets.git/commitdiff
Added CallOnInit() which allows the toolkit (wxCocoa) to do a bit of
authorDavid Elliott <dfe@tgwbd.org>
Thu, 3 Jul 2003 15:32:11 +0000 (15:32 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Thu, 3 Jul 2003 15:32:11 +0000 (15:32 +0000)
processing around the real OnInit() call.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/app.h
src/common/init.cpp

index 42b1425d26fe6cec22c9663769568a8f55d65787..c541b9015a7cd182880fdf207eee4b4d6a33a359 100644 (file)
@@ -97,6 +97,9 @@ public:
     // class version!
     virtual bool Initialize(int& argc, wxChar **argv);
 
+    // This gives wxCocoa a chance to call OnInit() with a memory pool in place
+    virtual bool CallOnInit() { return OnInit(); }
+
     // Called before OnRun(), this is a good place to do initialization -- if
     // anything fails, return false from here to prevent the program from
     // continuing. The command line is normally parsed here, call the base
index 58e2b591a22ee8c8e2e95c0177848fa8394d3b6c..4db4aab90d4e9a8194568d51f783af64a71114de 100644 (file)
@@ -392,7 +392,7 @@ int wxEntryReal(int& argc, wxChar **argv)
     WX_SUPPRESS_UNUSED_WARN(cleanupOnExit);
 
     // app initialization
-    if ( !wxTheApp->OnInit() )
+    if ( !wxTheApp->CallOnInit() )
     {
         // don't call OnExit() if OnInit() failed
         return -1;