• 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
NSPredicate to exclude specific elements??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPredicate to exclude specific elements??


  • Subject: NSPredicate to exclude specific elements??
  • From: Robert Monaghan <email@hidden>
  • Date: Sun, 21 Mar 2010 07:54:57 -0700

Hi Everyone,

You would think this is simple, but I can't figure this out.

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

How does one do this?

bob

_______________________________________________

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: NSPredicate to exclude specific elements??
      • From: Jon Pugh <email@hidden>
  • Prev by Date: Re: Core Data: fetching a subset of attributes/columns
  • Next by Date: Re: Core Data: fetching a subset of attributes/columns
  • Previous by thread: Re: Test for debug vs release
  • Next by thread: Re: NSPredicate to exclude specific elements??
  • Index(es):
    • Date
    • Thread