• 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 evaluateWithObject:] and NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-[NSPredicate evaluateWithObject:] and NSArray


  • Subject: -[NSPredicate evaluateWithObject:] and NSArray
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 13 Jun 2007 18:06:40 -0600

Since the list archives appear to be down, and I'm not getting anything useful out of Google...

I have a KVC-compliant object. The value for key kMDItemContactKeywords is a multi-value, so -valueForKey: returns an array of objects. I have a predicate that is normally used for Spotlight searching, and I want to see if individual objects match the predicate, but -evaluateWithObject: seems to raise exceptions when trying to parse an NSArray, whereas NSMetadataQuery handles the situation correctly.

Is there any sort of workaround to this problem, and if so, then what do I do to get multi-values to work correctly with -[NSPredicate evaluateWithObject:]?

If it helps, the precise predicate is "kMDItemContactKeywords LIKE '*SomeValue*'".

Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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 evaluateWithObject:] and NSArray
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: Drag and Drop from NSTableView to Finder
  • Next by Date: Re: First foray into HID, getReport() and setReport()
  • Previous by thread: Re: Drag and Drop from NSTableView to Finder
  • Next by thread: Re: -[NSPredicate evaluateWithObject:] and NSArray
  • Index(es):
    • Date
    • Thread