-[NSPredicate evaluateWithObject:] and NSArray
-[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