Use the new wxNSStringWithWxString conversion function

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2003-06-13 21:15:04 +00:00
parent 724ebdde8a
commit c8cae94c72
2 changed files with 4 additions and 4 deletions

View 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)

View 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)