Re: Custom NSArrayController that manages its own array?
Re: Custom NSArrayController that manages its own array?
- Subject: Re: Custom NSArrayController that manages its own array?
- From: Jens Alfke <email@hidden>
- Date: Wed, 19 Oct 2011 14:30:41 -0700
On Oct 18, 2011, at 5:01 PM, Keary Suska wrote:
> Well, "entries" in this case is redundant. If you subclass is designed to manage an array of "entries", then its content would simply be the array itself. There is no need to abstract it out by the key. In fact, it is a code smell to do so.
The entries aren’t stored in an array, though. (Well, right now they are, but that’s temporary scaffolding.) They’re really a query result, with all that implies — rows may be fetched on demand, not all rows may be stored locally, rows may get turned into objects lazily. That’s why I implemented the KVC collection methods to synthesize a fake NSMutableArray property.
—Jens
_______________________________________________
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