#include "wx/log.h"
#import <AppKit/NSButton.h>
-#import <Foundation/NSString.h>
+#include "wx/cocoa/string.h"
+#include "wx/cocoa/autorelease.h"
IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
// wxRadioButtonBase == wxControl
const wxValidator& validator,
const wxString& name)
{
+ wxAutoNSAutoreleasePool pool;
if(!CreateControl(parent,winid,pos,size,style,validator,name))
return false;
m_cocoaNSView = NULL;
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)
wxRadioButton::~wxRadioButton()
{
- CocoaRemoveFromParent();
- SetNSButton(NULL);
+ DisassociateNSButton(m_cocoaNSView);
}
void wxRadioButton::SetValue(bool)