• 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: respondsToSelector - #import OR compiler warnings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: respondsToSelector - #import OR compiler warnings?


  • Subject: Re: respondsToSelector - #import OR compiler warnings?
  • From: Steve Cronin <email@hidden>
  • Date: Tue, 30 Dec 2008 00:06:02 -0600

Folks;

Thanks for the rapid and thought-provoking responses!!

Ken - I don't understand what you said about the method's signature's compliance with NSObject _protocol_.
I looked at the protocol definition in the documentation and I just don't understand well enough to see what I could do to "side-step" the warnings,
Would you be willing to spend another sentence or two on that?


Bill - OK I have a lot to learn - studying AppKit's delegate implementation is a to-do! (gulp)
In the meantime, tweaked your snippet and just added this at the end of the header of the class where the -respondsToSelector: issue arose:


//respondsToSelector silencer - see -myMethodName
@interface NSObject (MyClassName)
- (id) foo;
@end

This silences the compiler without any #import being required in the .m file AND allows me to document to issue in the header where it seems to me it belongs. YAY!! Any downsides to this?
I assume I could implement this declaration with the actual return expected (e.g. (NSDictionary*)) and squeeze even more assistance out that hard-working compiler, right?


Thanks to all of you: Kyle, Graham, Ken and Bill for sharing your time and your knowledge!
Steve


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: respondsToSelector - #import OR compiler warnings?
      • From: Steve Cronin <email@hidden>
    • Re: respondsToSelector - #import OR compiler warnings?
      • From: Quincey Morris <email@hidden>
    • Re: respondsToSelector - #import OR compiler warnings?
      • From: Ken Thomases <email@hidden>
References: 
 >respondsToSelector - #import OR compiler warnings? (From: Steve Cronin <email@hidden>)
 >Re: respondsToSelector - #import OR compiler warnings? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: respondsToSelector - #import OR compiler warnings?
  • Next by Date: Re: Saving unseen NSView with subviews to NSImage
  • Previous by thread: Re: respondsToSelector - #import OR compiler warnings?
  • Next by thread: Re: respondsToSelector - #import OR compiler warnings?
  • Index(es):
    • Date
    • Thread