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: Usefulness of -Wstrict-selector-match



 
On Friday, April 18, 2008, at 10:02AM, "Sean McBride" <email@hidden> wrote:
>
>Thanks for your reply.  The cast would of course work, but seems icky
>since the variable is not an NSArray, it could be an NSSet,
>NSDictionary, etc.  The snippit I gave is of course an example, but the
>real code is in an NSValueTransformer subclass' "-(id)transformedValue:
>(id)value" method, hence my use of 'id'.
>
>I guess my real question is: are people using -Wstrict-selector-match or
>do most of you run into annoying warnings like below?

For what it's worth, the only selector warning I typically enable is -Wundeclared-selector.  I don't use -Wstrict-selector-match because it leads to annoying workarounds in cases like this (why does CIVector use size_t anyway?).   Personally, I think typing the variable as NSArray would be confusing to read in your case, so I'd probably go with a cast.

-- 
adam

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/objc-language/email@hidden

This email sent to email@hidden

References: 
 >Usefulness of -Wstrict-selector-match (From: "Sean McBride" <email@hidden>)
 >Re: Usefulness of -Wstrict-selector-match (From: Jonathan deWerd <email@hidden>)
 >Re: Usefulness of -Wstrict-selector-match (From: "Sean McBride" <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.