From b0fa6efc8bd0505538edca27e4caccc9035b50d4 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 14 Aug 2013 09:15:16 +0000 Subject: [PATCH] using #ifdef wxABORT_ON_CONFIG_ERROR not just #if as elsewhere git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/app.h | 3 ++- src/osx/carbon/app.cpp | 2 ++ src/osx/cocoa/utils.mm | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h index 723841913c..b341817be2 100644 --- a/include/wx/osx/app.h +++ b/include/wx/osx/app.h @@ -152,8 +152,9 @@ 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 d460675d4b..5285c21bd8 100644 --- a/src/osx/carbon/app.cpp +++ b/src/osx/carbon/app.cpp @@ -403,7 +403,9 @@ 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 3e07d7dc2c..f0d6a398d0 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; - m_onInitResult = false; + // this will only run one cycle to make sure the OS is ready [NSApp run]; - return m_onInitResult; + return OnInit(); } void wxApp::DoCleanUp() -- 2.47.2