Thanks for the suggestion!
All of the examples I gave work if you are trying to match the argument. CONTAINS is another way to match, but will it work with NOT? So far, everything that you would expect to work, doesn't. This is a case where you wish that Apple would document this better. (I haven't found any working examples or docs explaining the practical use of NOT or NONE, etc.. on Apple's site)

Bob

Sent from my iPhone

On Mar 21, 2010, at 9:16, Jon Pugh <jonp...@frostbitefalls.com> wrote:

At 7:54 AM -0700 3/21/10, Robert Monaghan wrote:
Lets say I have a pile of NSString Paths in an array, where some of them have the word "GREEN" in the file name. I've been trying to build an NSPredicate which would exclude elements that contain the name..

Every attempt that I have done gives me an exception.. what am I missing??

eg:
@"(SELF ALL *) NOT (SELF like[c] %@)"
@"NOT (SELF like[c] %@)"
@"SELF !like[c] %@"
@"SELF NOT like[c] %@"

for example give me an NSInvalidArgumentException

I have used @"%K CONTAINS[cd] %@" successfully. I would expect @"%K NOT CONTAINS[cd] %@" to also work.

Jon
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/bob%40gluetools.com

This email sent to b...@gluetools.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to