adapting to init pattern

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2011-06-08 22:48:29 +00:00
parent bbfd454841
commit f599a41509
5 changed files with 12 additions and 5 deletions

View File

@@ -271,7 +271,7 @@ extern int wxOSXGetIdFromSelector(SEL action );
- (id) init - (id) init
{ {
[super init]; self = [super init];
return self; return self;
} }

View File

@@ -49,7 +49,7 @@
- (id) init - (id) init
{ {
[super init]; self = [super init];
return self; return self;
} }

View File

@@ -90,6 +90,13 @@ wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer,
long WXUNUSED(extraStyle)) long WXUNUSED(extraStyle))
{ {
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
if ( size == wxDefaultSize )
{
if ( style & wxSL_VERTICAL )
r.size.height = r.size.width * 2;
else
r.size.width = r.size.height * 2;
}
wxNSSlider* v = [[wxNSSlider alloc] initWithFrame:r]; wxNSSlider* v = [[wxNSSlider alloc] initWithFrame:r];
int tickMarks = 0; int tickMarks = 0;

View File

@@ -324,7 +324,7 @@ private:
- (id)initWithItemIdentifier: (NSString*) identifier - (id)initWithItemIdentifier: (NSString*) identifier
{ {
[super initWithItemIdentifier:identifier]; self = [super initWithItemIdentifier:identifier];
impl = NULL; impl = NULL;
[self setTarget: self]; [self setTarget: self];
[self setAction: @selector(clickedAction:)]; [self setAction: @selector(clickedAction:)];
@@ -413,7 +413,7 @@ private:
- (id)initWithFrame:(NSRect)frame - (id)initWithFrame:(NSRect)frame
{ {
[super initWithFrame:frame]; self = [super initWithFrame:frame];
impl = NULL; impl = NULL;
[self setTarget: self]; [self setTarget: self];
[self setAction: @selector(clickedAction:)]; [self setAction: @selector(clickedAction:)];

View File

@@ -1444,7 +1444,7 @@ void wxWidgetCocoaImpl::SetVisibility( bool visible )
- (id)init:(wxWindow *)win - (id)init:(wxWindow *)win
{ {
[super init]; self = [super init];
m_win = win; m_win = win;
m_isDone = false; m_isDone = false;