diff --git a/src/cocoa/button.mm b/src/cocoa/button.mm index 8e6e57780a..aa8472a8d7 100644 --- a/src/cocoa/button.mm +++ b/src/cocoa/button.mm @@ -17,7 +17,7 @@ #endif #import -#import +#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) diff --git a/src/cocoa/radiobut.mm b/src/cocoa/radiobut.mm index 020b195213..b3916b716b 100644 --- a/src/cocoa/radiobut.mm +++ b/src/cocoa/radiobut.mm @@ -14,7 +14,7 @@ #include "wx/log.h" #import -#import +#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)