]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/statbmp.mm
minor changes to eliminate unused parameter warning + some cleanup
[wxWidgets.git] / src / cocoa / statbmp.mm
index de08f55c6ac2807c5d18a2f4e002c3457af61655..832ce11acd346e3777f502cd15ae2bfc64451ae9 100644 (file)
@@ -12,6 +12,8 @@
 #include "wx/app.h"
 #include "wx/statbmp.h"
 
+#import <AppKit/NSView.h>
+
 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
 BEGIN_EVENT_TABLE(wxStaticBitmap, wxControl)
 END_EVENT_TABLE()
@@ -27,6 +29,8 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID winid,
     if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
         return false;
     m_cocoaNSView = NULL;
+    SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
+    [m_cocoaNSView release];
     if(m_parent)
         m_parent->CocoaAddChild(this);
     return true;
@@ -34,7 +38,6 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID winid,
 
 wxStaticBitmap::~wxStaticBitmap()
 {
-    CocoaRemoveFromParent();
 }
 
 void wxStaticBitmap::SetIcon(const wxIcon& icon)