• 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: How does NSArrayController know?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does NSArrayController know?


  • Subject: Re: How does NSArrayController know?
  • From: Chris Hanson <email@hidden>
  • Date: Fri, 5 Oct 2007 00:59:15 -0700

On Oct 5, 2007, at 12:03 AM, Bob Ueland wrote:

I've looked at "NSArrayController Class Reference" but couldn't find any info. I suspected kvc compliance but the document never mentions it (or I missed it).

You suspect correctly; in the example, MyDocument is Key-Value Coding compliant for an ordered relationship under the "employees" key. To get at this ordered relationship, the interested party can either invoke the methods directly or (in generic, reusable code like NSArrayController) manipulate the proxy retuned as the result of sending an instance of MyDocument -mutableArrayValueForKey: with the key "employees".


How this works is documented in the Programming Guide for Key-Value Coding as well as in <Foundation/NSKeyValueCoding.h>. There are a number of additional methods that can be implemented that will also be invoked at appropriate times. It's also fundamental to working with Core Data relationships, though they are unordered and thus use - mutableSetValueForKey:.

  -- Chris

_______________________________________________

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: 
 >How does NSArrayController know? (From: Bob Ueland <email@hidden>)

  • Prev by Date: Re: How does NSArrayController know?
  • Next by Date: WSMethodInvocationSetParameters xml encoding
  • Previous by thread: Re: How does NSArrayController know?
  • Next by thread: Re: How does NSArrayController know?
  • Index(es):
    • Date
    • Thread