diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h index b341817be2..723841913c 100644 --- a/include/wx/osx/app.h +++ b/include/wx/osx/app.h @@ -152,9 +152,8 @@ public: virtual void OSXOnWillTerminate(); private: -#if wxOSX_USE_IPHONE bool m_onInitResult; -#endif + public: #endif diff --git a/src/osx/carbon/app.cpp b/src/osx/carbon/app.cpp index 30fb4b076f..30e3ba48be 100644 --- a/src/osx/carbon/app.cpp +++ b/src/osx/carbon/app.cpp @@ -403,9 +403,7 @@ void wxApp::MacReopenApp() #if wxOSX_USE_COCOA_OR_IPHONE void wxApp::OSXOnWillFinishLaunching() { -#if wxOSX_USE_IPHONE m_onInitResult = OnInit(); -#endif } void wxApp::OSXOnDidFinishLaunching() diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index f0d6a398d0..3e07d7dc2c 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -314,9 +314,9 @@ bool wxApp::DoInitGui() bool wxApp::CallOnInit() { wxMacAutoreleasePool autoreleasepool; - // this will only run one cycle to make sure the OS is ready + m_onInitResult = false; [NSApp run]; - return OnInit(); + return m_onInitResult; } void wxApp::DoCleanUp()