Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: respondsToSelector - #import OR compiler warnings?



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >respondsToSelector - #import OR compiler warnings? (From: Steve Cronin <email@hidden>)
 >Re: respondsToSelector - #import OR compiler warnings? (From: Graham Cox <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.