X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b466e85a7e81db84545bc44c83cbe4ccacd4fe8e..55410bb4f67febe1ca20654f078ea4fb9a6223ae:/src/osx/cocoa/gauge.mm diff --git a/src/osx/cocoa/gauge.mm b/src/osx/cocoa/gauge.mm index 2620e53035..895a70cae8 100644 --- a/src/osx/cocoa/gauge.mm +++ b/src/osx/cocoa/gauge.mm @@ -19,24 +19,22 @@ @interface wxNSProgressIndicator : NSProgressIndicator { - WXCOCOAIMPL_COMMON_MEMBERS } -WXCOCOAIMPL_COMMON_INTERFACE - @end @implementation wxNSProgressIndicator -- (id)initWithFrame:(NSRect)frame ++ (void)initialize { - [super initWithFrame:frame]; - impl = NULL; - return self; + static BOOL initialized = NO; + if (!initialized) + { + initialized = YES; + wxOSXCocoaClassAddWXMethods( self ); + } } -WXCOCOAIMPL_COMMON_IMPLEMENTATION - @end class wxOSXGaugeCocoaImpl : public wxWidgetCocoaImpl @@ -98,7 +96,6 @@ wxWidgetImplType* wxWidgetImpl::CreateGauge( wxWindowMac* wxpeer, [v setIndeterminate:FALSE]; [v setDoubleValue: (double) value]; wxWidgetCocoaImpl* c = new wxOSXGaugeCocoaImpl( wxpeer, v ); - [v setImplementation:c]; return c; }