]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/bmpbuttn.mm
adding 10.4 build compatibility for osx cocoa, see #10361
[wxWidgets.git] / src / osx / cocoa / bmpbuttn.mm
index 3de4eafe5facd3f22a76f3a6e58df12c80382898..0c1f471a3ea87a7d70b14c7dfef0354c9e8c96b9 100644 (file)
@@ -31,15 +31,12 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer,
                                     long style, 
                                     long extraStyle) 
 {
-    NSView* sv = static_cast<NSView*>(wxpeer->GetParent()->GetHandle() );
-    
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
     
     [v setBezelStyle:NSRegularSquareBezelStyle];
     [v setImage:bitmap.GetNSImage() ];
     [v setButtonType:NSMomentaryPushInButton];
-    [sv addSubview:v];
     wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
     [v setImplementation:c];
     return c;