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

Re: Keypaths


  • Subject: Re: Keypaths
  • From: Niklas Saers <email@hidden>
  • Date: Wed, 16 Jul 2008 12:12:16 +0200

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 (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


References: 
 >Keypaths (From: Niklas Saers <email@hidden>)
 >Re: Keypaths (From: "Hamish Allan" <email@hidden>)
 >Re: Keypaths (From: "Kyle Sluder" <email@hidden>)
 >Re: Keypaths (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS
  • Next by Date: Converting Windows RC to NIBs (was Re: Creating and App menu from Scratch)
  • Previous by thread: Re: Keypaths
  • Next by thread: how to add modal dialog once application begin to run
  • Index(es):
    • Date
    • Thread