Re: Indexed Accessors vs. Data Sources
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