• 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: Indexed Accessors vs. Data Sources
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Indexed Accessors vs. Data Sources


  • Subject: Re: Indexed Accessors vs. Data Sources
  • From: mmalc crawford <email@hidden>
  • Date: Tue, 11 Dec 2007 08:49:45 -0800


On Dec 11, 2007, at 8:39 AM, Adam Thorsen wrote:

When working with NSTableView, it seems like binding an NSArrayController to an object that implements the indexed accessor methods (described here: http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/AccessorConventions.html#/ /apple_ref/doc/uid/20002174-178830) is not all that much less work than implementing a data source. Is there an advantage to using the indexed accessor approach (it seems to be the recommended method these days from what I've read)?

Yes. You're just looking at a subset of the problem.
Getting data to and from the table view is easy enough. Managing change is not so trivial.
KVO change notifications provide a consistent and pervasive architecture for managing change, in many cases automatically with no additional code.


mmalc

_______________________________________________

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: 
 >Indexed Accessors vs. Data Sources (From: Adam Thorsen <email@hidden>)

  • Prev by Date: doc bug: links should be local
  • Next by Date: Re: doc bug: links should be local
  • Previous by thread: Indexed Accessors vs. Data Sources
  • Next by thread: doc bug: links should be local
  • Index(es):
    • Date
    • Thread