• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Overriding private method w/o warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Overriding private method w/o warning
      • From: David Dunham <email@hidden>
References: 
 >Overriding private method w/o warning (From: David Dunham <email@hidden>)

  • Prev by Date: Re: distcc fail on Snow Leopard
  • Next by Date: Re: llvm-gcc
  • Previous by thread: Overriding private method w/o warning
  • Next by thread: Re: Overriding private method w/o warning
  • Index(es):
    • Date
    • Thread