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

Re: -[NSPredicate evaluateWithObject:] and NSArray


  • Subject: Re: -[NSPredicate evaluateWithObject:] and NSArray
  • From: Keary Suska <email@hidden>
  • Date: Thu, 14 Jun 2007 15:09:45 -0600
  • Thread-topic: -[NSPredicate evaluateWithObject:] and NSArray

on 6/14/07 1:37 PM, email@hidden purportedly said:

>> Are you passing your NSArray as the object parameter to
>> -evaluateWithObject:? If so, considering that the method returns a
>> *single*
>> boolean value, how could it possibly work with a collection object?
>
> No, I'm passing the KVC-compliant object into the predicate. The
> object's -valueForKey: method returns an NSArray as a value for one
> of its keys.

Hmm, that won't work at all (either).

>> What would lead you to believe that NSMetadataQuery and NSPredicate
>> would
>> behave similarly, or even analogously? Note the keyword differences
>> "query"
>> vs "predicate". Therein lies your answer.
>
> I thought a predicate was a predicate. How do I get -
> evaluateWithObject: to work with keys that return an NSArray as their
> value?

Have you read the Predicate Programming Guide?
file:///Developer/ADC Reference Library/documentation/Cocoa/Conceptual/P
redicates/index.html

Check out especially "Using Predicates with Relationships".

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

References: 
 >Re: -[NSPredicate evaluateWithObject:] and NSArray (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Core Data Beginner Question
  • Next by Date: Re: Core Data Beginner Question
  • Previous by thread: Re: -[NSPredicate evaluateWithObject:] and NSArray
  • Next by thread: NSClassFromString help
  • Index(es):
    • Date
    • Thread