Hi Scott & Kyle:

On Jul 16, 2008, at 2:22 AM, Scott Anguish wrote:
In fact, as long as you have modeled relationships from parent to
child you can do it, Core Data or not.  Get a reference to Balbo and
Ponto and then use a keypath involving @distinctUnionOfArrays to get
to it.  A bit of set theory is helpful here.
The Key-Value Coding Programming Guide has more info on this, including a sample data relationship and what the various operators will return when used.

http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/ArrayOperators.html#/ /apple_ref/doc/uid/20002176

I've been reading the document you refer to before posting, and Hillegass' chapter on the subject, but I'm getting lost in the syntax. What would be the correct way of getting the array of nodes, and the array of names?

NSArray *nodes = [balbo valueForKeyPath:@"@distinctUnionOfArrays.subnodes[name='Ponto Baggins'].subnodes"] ?? NSArray *names = [balbo valueForKeyPath:@"@distinctUnionOfArrays.subnodes[name='Ponto Baggins'].subnodes.name"] ??

Really, it bit that confuses me is "where @property NSString *name is 'Ponto Baggins'", how do I express that in a keypath?

Cheers

        Nik
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to