]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected log error after initialize when in release mode, window inheritance (genera...
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 7 Jul 2001 14:43:10 +0000 (14:43 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 7 Jul 2001 14:43:10 +0000 (14:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/app.cpp
src/mac/carbon/app.cpp
src/mac/carbon/notebmac.cpp
src/mac/carbon/window.cpp
src/mac/notebmac.cpp
src/mac/window.cpp

index d03b4244fd6607c5c19e6235f412dab3ee07ed2a..4e4699db1df73493cb160cbff05c14cf03ad546d 100644 (file)
@@ -459,6 +459,7 @@ bool wxApp::Initialize()
   wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
   wxTheColourDatabase->Initialize();
 
+#ifdef __WXDEBUG__
 #if wxUSE_LOG
     // flush the logged messages if any and install a 'safer' log target: the
     // default one (wxLogGui) can't be used after the resources are freed just
@@ -469,6 +470,7 @@ bool wxApp::Initialize()
     // this will flush the old messages if any
     delete wxLog::SetActiveTarget(new wxLogStderr);
 #endif // wxUSE_LOG
+#endif
 
   wxInitializeStockLists();
   wxInitializeStockObjects();
index d03b4244fd6607c5c19e6235f412dab3ee07ed2a..4e4699db1df73493cb160cbff05c14cf03ad546d 100644 (file)
@@ -459,6 +459,7 @@ bool wxApp::Initialize()
   wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
   wxTheColourDatabase->Initialize();
 
+#ifdef __WXDEBUG__
 #if wxUSE_LOG
     // flush the logged messages if any and install a 'safer' log target: the
     // default one (wxLogGui) can't be used after the resources are freed just
@@ -469,6 +470,7 @@ bool wxApp::Initialize()
     // this will flush the old messages if any
     delete wxLog::SetActiveTarget(new wxLogStderr);
 #endif // wxUSE_LOG
+#endif
 
   wxInitializeStockLists();
   wxInitializeStockObjects();
index 6e94d2804988ed1136ee5d3d74c32aaa967703f4..9d0b2c4593ac775fe13c9b03577f2de74319bc1d 100644 (file)
@@ -134,14 +134,17 @@ wxNotebook::~wxNotebook()
 
 void wxNotebook::SetPadding(const wxSize& padding)
 {
+   wxFAIL_MSG( wxT("wxNotebook::SetPadding not implemented") );
 }
 
 void wxNotebook::SetTabSize(const wxSize& sz)
 {
+    wxFAIL_MSG( wxT("wxNotebook::SetTabSize not implemented") );
 }
 
 void wxNotebook::SetPageSize(const wxSize& size)
 {
+    wxFAIL_MSG( wxT("wxNotebook::SetPageSize not implemented") );
 }
 
 int wxNotebook::SetSelection(int nPage)
@@ -175,17 +178,18 @@ wxString wxNotebook::GetPageText(int nPage) const
 
 int wxNotebook::GetPageImage(int nPage) const
 {
-    wxASSERT( IS_VALID_PAGE(nPage) );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("invalid notebook page") );
 
-    // TODO
-    return 0;
+    return 0 ;
 }
 
 bool wxNotebook::SetPageImage(int nPage, int nImage)
 {
-    wxASSERT( IS_VALID_PAGE(nPage) );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") );
+
+    wxCHECK_MSG( m_imageList && nImage < m_imageList->GetImageCount(), FALSE,
+                 _T("invalid image index in SetPageImage()") );
 
-    // TODO
     return FALSE;
 }
 
@@ -305,14 +309,6 @@ void wxNotebook::MacSetupTabs()
 //     time because doing it in ::Create() doesn't work (for unknown reasons)
 void wxNotebook::OnSize(wxSizeEvent& event)
 {
-    static bool s_bFirstTime = TRUE;
-    if ( s_bFirstTime ) {
-        // TODO: any first-time-size processing.
-        s_bFirstTime = FALSE;
-    }
-
-    // TODO: all this may or may not be necessary for your platform
-
     // emulate page change (it's esp. important to do it first time because
     // otherwise our page would stay invisible)
     int nSel = m_nSelection;
index 35f8c0ef6d44e56549f8ab3976506639b502f85d..0cd659a9f07fdcb429a6041f4b9b90336e174f34 100644 (file)
 extern wxList wxPendingDelete;
 wxWindowMac* gFocusWindow = NULL ;
 
+#ifdef __WXUNIVERSAL__
+    IMPLEMENT_ABSTRACT_CLASS(wxWindowMac, wxWindowBase)
+#else // __WXMAC__
+    IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
+#endif // __WXUNIVERSAL__/__WXMAC__
+
 #if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxWindowMac, wxEvtHandler)
-BEGIN_EVENT_TABLE(wxWindowMac, wxEvtHandler)
+
+BEGIN_EVENT_TABLE(wxWindowMac, wxWindowBase)
   EVT_ERASE_BACKGROUND(wxWindowMac::OnEraseBackground)
   EVT_SYS_COLOUR_CHANGED(wxWindowMac::OnSysColourChanged)
   EVT_INIT_DIALOG(wxWindowMac::OnInitDialog)
index 6e94d2804988ed1136ee5d3d74c32aaa967703f4..9d0b2c4593ac775fe13c9b03577f2de74319bc1d 100644 (file)
@@ -134,14 +134,17 @@ wxNotebook::~wxNotebook()
 
 void wxNotebook::SetPadding(const wxSize& padding)
 {
+   wxFAIL_MSG( wxT("wxNotebook::SetPadding not implemented") );
 }
 
 void wxNotebook::SetTabSize(const wxSize& sz)
 {
+    wxFAIL_MSG( wxT("wxNotebook::SetTabSize not implemented") );
 }
 
 void wxNotebook::SetPageSize(const wxSize& size)
 {
+    wxFAIL_MSG( wxT("wxNotebook::SetPageSize not implemented") );
 }
 
 int wxNotebook::SetSelection(int nPage)
@@ -175,17 +178,18 @@ wxString wxNotebook::GetPageText(int nPage) const
 
 int wxNotebook::GetPageImage(int nPage) const
 {
-    wxASSERT( IS_VALID_PAGE(nPage) );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("invalid notebook page") );
 
-    // TODO
-    return 0;
+    return 0 ;
 }
 
 bool wxNotebook::SetPageImage(int nPage, int nImage)
 {
-    wxASSERT( IS_VALID_PAGE(nPage) );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") );
+
+    wxCHECK_MSG( m_imageList && nImage < m_imageList->GetImageCount(), FALSE,
+                 _T("invalid image index in SetPageImage()") );
 
-    // TODO
     return FALSE;
 }
 
@@ -305,14 +309,6 @@ void wxNotebook::MacSetupTabs()
 //     time because doing it in ::Create() doesn't work (for unknown reasons)
 void wxNotebook::OnSize(wxSizeEvent& event)
 {
-    static bool s_bFirstTime = TRUE;
-    if ( s_bFirstTime ) {
-        // TODO: any first-time-size processing.
-        s_bFirstTime = FALSE;
-    }
-
-    // TODO: all this may or may not be necessary for your platform
-
     // emulate page change (it's esp. important to do it first time because
     // otherwise our page would stay invisible)
     int nSel = m_nSelection;
index 35f8c0ef6d44e56549f8ab3976506639b502f85d..0cd659a9f07fdcb429a6041f4b9b90336e174f34 100644 (file)
 extern wxList wxPendingDelete;
 wxWindowMac* gFocusWindow = NULL ;
 
+#ifdef __WXUNIVERSAL__
+    IMPLEMENT_ABSTRACT_CLASS(wxWindowMac, wxWindowBase)
+#else // __WXMAC__
+    IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
+#endif // __WXUNIVERSAL__/__WXMAC__
+
 #if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxWindowMac, wxEvtHandler)
-BEGIN_EVENT_TABLE(wxWindowMac, wxEvtHandler)
+
+BEGIN_EVENT_TABLE(wxWindowMac, wxWindowBase)
   EVT_ERASE_BACKGROUND(wxWindowMac::OnEraseBackground)
   EVT_SYS_COLOUR_CHANGED(wxWindowMac::OnSysColourChanged)
   EVT_INIT_DIALOG(wxWindowMac::OnInitDialog)