Re: Overriding private method w/o warning
Re: Overriding private method w/o warning
- Subject: Re: Overriding private method w/o warning
- From: Jens Alfke <email@hidden>
- Date: Mon, 7 Sep 2009 14:19:45 -0700
On Sep 7, 2009, at 1:50 PM, David Dunham wrote:
In the past, I used
BOOL retVal = [(id) super _shouldTerminate] != 0;
where the cast suppressed a warning. But that gives an error with
clang, so I'm back to
BOOL retVal = [super _shouldTerminate] != 0;
warning: method '-_shouldTerminate' not found (return type defaults
to 'id')
Try declaring a category on NSApplication that contains the method:
@interface NSApplication (InternalStuffIShouldNotUse)
- (BOOL) _shouldTerminate;
@end
Then [super _shouldTerminate] should compile without warnings.
—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden