• 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: Custom NSArrayController that manages its own array?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Custom NSArrayController that manages its own array? (From: Jens Alfke <email@hidden>)
 >Re: Custom NSArrayController that manages its own array? (From: Keary Suska <email@hidden>)
 >Re: Custom NSArrayController that manages its own array? (From: Jens Alfke <email@hidden>)
 >Re: Custom NSArrayController that manages its own array? (From: Keary Suska <email@hidden>)

  • Prev by Date: ANN: Webcast tomorrow on CouchDB / Couchbase Mobile
  • Next by Date: Re: Custom NSArrayController that manages its own array?
  • Previous by thread: Re: Custom NSArrayController that manages its own array?
  • Next by thread: Re: Custom NSArrayController that manages its own array?
  • Index(es):
    • Date
    • Thread