]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/statline2.mm
Applied patch [ 743471 ] wxSplitter::Unsplit fix
[wxWidgets.git] / src / cocoa / statline2.mm
index aa99c745684b3deb9604d21e6392c93cb60ed88d..8ad30c325092a188c8e0cea93cbc5a2d73f37bf3 100644 (file)
@@ -12,6 +12,8 @@
 #include "wx/app.h"
 #include "wx/statline.h"
 
+#import <AppKit/NSView.h>
+
 IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
 BEGIN_EVENT_TABLE(wxStaticLine, wxStaticLineBase)
 END_EVENT_TABLE()
@@ -25,7 +27,8 @@ bool wxStaticLine::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,5 +37,6 @@ bool wxStaticLine::Create(wxWindow *parent, wxWindowID winid,
 wxStaticLine::~wxStaticLine()
 {
     CocoaRemoveFromParent();
+    SetNSView(NULL);
 }