]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
override SetInitialBestSize() to do nothing (we must add our strings first)
[wxWidgets.git] / src / common / appbase.cpp
index a0d2dd9157fbff0cf04af1c9b52d9a3a33363c11..d479bef6e1dbd0efef91195c7815efba152c4e92 100644 (file)
@@ -109,6 +109,13 @@ wxAppConsole::wxAppConsole()
 
 #ifdef __WXDEBUG__
     SetTraceMasks();
+#if wxUSE_UNICODE
+    // In unicode mode the SetTraceMasks call can cause an apptraits to be
+    // created, but since we are still in the constructor the wrong kind will
+    // be created for GUI apps.  Destroy it so it can be created again later.
+    delete m_traits;
+    m_traits = NULL;
+#endif
 #endif
 }
 
@@ -277,6 +284,10 @@ int wxAppConsole::FilterEvent(wxEvent& WXUNUSED(event))
     return -1;
 }
 
+// ----------------------------------------------------------------------------
+// exception handling
+// ----------------------------------------------------------------------------
+
 #if wxUSE_EXCEPTIONS
 
 void
@@ -288,6 +299,17 @@ wxAppConsole::HandleEvent(wxEvtHandler *handler,
     (handler->*func)(event);
 }
 
+bool
+wxAppConsole::OnExceptionInMainLoop()
+{
+    throw;
+
+    // some compilers are too stupid to know that we never return after throw
+#if defined(__DMC__) || (defined(_MSC_VER) && _MSC_VER < 1200)
+    return false;
+#endif
+}
+
 #endif // wxUSE_EXCEPTIONS
 
 // ----------------------------------------------------------------------------