• 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: NSTableView app design
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView app design


  • Subject: Re: NSTableView app design
  • From: Paul Lynch <email@hidden>
  • Date: Thu, 27 Apr 2006 18:17:03 +0100


On 27 Apr 2006, at 18:02, Scott Frankel wrote:

In both Hillegas' chapter on Helper Objects and Apple's online docs on using NSTableViews, methods are used to explicitly return the number of rows in a table and the value of an object in a specific column (as well as setting the value). In the following chapter on Bindings, none of these methods is called. An NSArrayController appears to handle those tasks. Do I have this correct? Does using the view's bindings obviate the need to call numberOfRowsInTableView:, &c.?

Yes. An NSArrayController acts as an NSTableView dataSource for it's array.


Also, if I understand correctly, a tableView object's data source is considered part of the app's controller, in M-V-C terms.

Yes - or, more accurately, part of the controller layer.

Using bindings and key-value coding style accessors, the functionality that would've been handled by the controller is now accessed directly in/from the model. Is this correct?

No. The NSArrayController is part of the controller layer. The key point is that the controller can consist of multiple layers, and can reference the model objects at any point.


Paul

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTableView app design
      • From: Ondra Cada <email@hidden>
References: 
 >NSTableView app design (From: Scott Frankel <email@hidden>)

  • Prev by Date: NSTableView app design
  • Next by Date: Re: NSTableView app design
  • Previous by thread: NSTableView app design
  • Next by thread: Re: NSTableView app design
  • Index(es):
    • Date
    • Thread