]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/stattext.mm
The mmedia contrib requires sys/soundcard.h on unix, so disable it on unix
[wxWidgets.git] / src / cocoa / stattext.mm
index 12a326714b4a6cadd0d27e6d88dabefa639b1a62..1e9c86e7f3632a48658876a1b49cb8f4c33ac8de 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     2003/02/15
 // RCS-ID:      $Id: 
 // Copyright:   (c) 2003 David Elliott
-// Licence:    wxWindows license
+// Licence:    wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/wxprec.h"
@@ -16,6 +16,7 @@
 #endif //WX_PRECOMP
 
 #include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/string.h"
 
 #import <Foundation/NSString.h>
 #import <AppKit/NSTextField.h>
@@ -39,7 +40,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID winid,
     m_cocoaNSView = NULL;
     SetNSTextField([[NSTextField alloc] initWithFrame:MakeDefaultNSRect(size)]);
     [m_cocoaNSView release];
-    [GetNSTextField() setStringValue:[NSString stringWithCString:label.c_str()]];
+    [GetNSTextField() setStringValue:wxNSStringWithWxString(label)];
 //    [GetNSTextField() setBordered: NO];
     [GetNSTextField() setBezeled: NO];
     [GetNSTextField() setEditable: NO];
@@ -60,7 +61,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID winid,
 
 wxStaticText::~wxStaticText()
 {
-    DisassociateNSTextField(m_cocoaNSView);
+    DisassociateNSTextField(GetNSTextField());
 }
 
 void wxStaticText::SetLabel(const wxString& label)