Re: respondsToSelector - #import OR compiler warnings?
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