]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/stattext.mm
extensions management unified
[wxWidgets.git] / src / cocoa / stattext.mm
index 29e247c9c962632a6a546a62fa8815bb020c0628..ff04f5899a510a5d6fc49c4c3b6843ae4214d562 100644 (file)
@@ -9,10 +9,14 @@
 // Licence:    wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:    wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#include "wx/app.h"
-#include "wx/stattext.h"
+#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/stattext.h"
+#endif //WX_PRECOMP
 
 #include "wx/cocoa/autorelease.h"
 
 #include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/string.h"
 
 #import <Foundation/NSString.h>
 #import <AppKit/NSTextField.h>
 
 #import <Foundation/NSString.h>
 #import <AppKit/NSTextField.h>
@@ -36,7 +40,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID winid,
     m_cocoaNSView = NULL;
     SetNSTextField([[NSTextField alloc] initWithFrame:MakeDefaultNSRect(size)]);
     [m_cocoaNSView release];
     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];
 //    [GetNSTextField() setBordered: NO];
     [GetNSTextField() setBezeled: NO];
     [GetNSTextField() setEditable: NO];
@@ -57,7 +61,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID winid,
 
 wxStaticText::~wxStaticText()
 {
 
 wxStaticText::~wxStaticText()
 {
-    DisassociateNSTextField(m_cocoaNSView);
+    DisassociateNSTextField(GetNSTextField());
 }
 
 void wxStaticText::SetLabel(const wxString& label)
 }
 
 void wxStaticText::SetLabel(const wxString& label)