]> git.saurik.com Git - wxWidgets.git/commitdiff
Use the new wxNSStringWithWxString conversion function
authorDavid Elliott <dfe@tgwbd.org>
Fri, 13 Jun 2003 21:15:04 +0000 (21:15 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Fri, 13 Jun 2003 21:15:04 +0000 (21:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/cocoa/button.mm
src/cocoa/radiobut.mm

index 8e6e57780a1fb9e77040bb6e5594440eea770902..aa8472a8d7616d3f4a739834c025188bc2107049 100644 (file)
@@ -17,7 +17,7 @@
 #endif
 
 #import <AppKit/NSButton.h>
-#import <Foundation/NSString.h>
+#include "wx/cocoa/string.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
 BEGIN_EVENT_TABLE(wxButton, wxButtonBase)
@@ -41,7 +41,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
     [m_cocoaNSView release];
 
     [GetNSButton() setBezelStyle:NSRoundedBezelStyle];
-    [GetNSButton() setTitle:[NSString stringWithCString: label.c_str()]];
+    [GetNSButton() setTitle:wxNSStringWithWxString(label)];
     [GetNSControl() sizeToFit];
 
     if(m_parent)
index 020b1952131b199dc1cebff41bcd175bd958b1a1..b3916b716b697f496285acc5e0b716a1369cb5f0 100644 (file)
@@ -14,7 +14,7 @@
 #include "wx/log.h"
 
 #import <AppKit/NSButton.h>
-#import <Foundation/NSString.h>
+#include "wx/cocoa/string.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
 // wxRadioButtonBase == wxControl
@@ -37,7 +37,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID winid,
     SetNSButton([[NSButton alloc] initWithFrame: cocoaRect]);
     [m_cocoaNSView release];
     [GetNSButton() setButtonType: NSRadioButton];
-    [GetNSButton() setTitle:[NSString stringWithCString: label.c_str()]];
+    [GetNSButton() setTitle:wxNSStringWithWxString(label)];
     [GetNSControl() sizeToFit];
 
     if(m_parent)