• 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: Ondra Cada <email@hidden>
  • Date: Thu, 27 Apr 2006 19:40:32 +0200

Paul,

On 27.4.2006, at 19:17, Paul Lynch 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.

Correct me please if I am wrong, but I really do not think it does.

Instead, the table view (along with its table columns) uses bindings to get the data from the controller, named bindings being a completely and conceptually different mechanism from the elder NSTableView dataSource.

It is even possible (though generally not desirable for readability and maintentance purposes) to make one NSArrayController to serve different tables, some through bindings, others through the data source protocol. The latter ones can display a completely different data in such a setup.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Scott Frankel <email@hidden>
References: 
 >NSTableView app design (From: Scott Frankel <email@hidden>)
 >Re: NSTableView app design (From: Paul Lynch <email@hidden>)

  • Prev by Date: Key value binding to "class" of object
  • Next by Date: First day of the week? Which one?
  • Previous by thread: Re: NSTableView app design
  • Next by thread: Re: NSTableView app design
  • Index(es):
    • Date
    • Thread