]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/notebook.mm
wx/wxprec.h already includes wx/defs.h (with other minor cleaning).
[wxWidgets.git] / src / cocoa / notebook.mm
index 28e0978ef7974844e46933f626829be1f4ac973c..d79c9bd8754affa99d9b271e98b6602c8d28872d 100644 (file)
@@ -64,6 +64,7 @@
 - (void)dealloc
 {
     [m_image release];
+    [super dealloc];
 }
 
 - (NSSize)sizeOfLabel:(BOOL)shouldTruncateLabel
@@ -180,7 +181,7 @@ wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage)
     [tvitem retain];
     [GetNSTabView() removeTabViewItem:tvitem];
     // Remove the child window as a notebook page
-    wxASSERT([tvitem view] == page->GetNSViewForSuperview());
+    wxASSERT(static_cast<NSView*>([tvitem view]) == page->GetNSViewForSuperview());
     [tvitem setView:nil];
     [tvitem release];
     // Make it back into a normal child window
@@ -202,7 +203,7 @@ bool wxNotebook::InsertPage( size_t pos,
     m_pages.Insert(page,pos);
     NSTabViewItem *tvitem = [[WXCTabViewImageItem alloc] initWithIdentifier:nil];
     [tvitem setLabel: wxNSStringWithWxString(title)];
-    const wxBitmap *bmp = (imageId!=-1)?m_imageList->GetBitmap(imageId):NULL;
+    const wxBitmap *bmp = (imageId!=-1)?m_imageList->GetBitmapPtr(imageId):NULL;
     if(bmp)
         [(WXCTabViewImageItem*) tvitem setImage: bmp->GetNSImage(true)];
 
@@ -250,7 +251,7 @@ int wxNotebook::GetPageImage(size_t nPage) const
 
 bool wxNotebook::SetPageImage(size_t nPage, int nImage)
 {
-    const wxBitmap *bmp = nImage!=-1?m_imageList->GetBitmap(nImage):NULL;
+    const wxBitmap *bmp = nImage!=-1?m_imageList->GetBitmapPtr(nImage):NULL;
     if(!bmp)
         return false;
     NSTabViewItem *tvitem = [GetNSTabView() tabViewItemAtIndex: nPage];