• 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: Scott Frankel <email@hidden>
  • Date: Thu, 27 Apr 2006 11:12:22 -0700


Thanks for the responses. They definitely help clarify.

Your comment below about different tables brings up another question. The app I'm planning has more than one tableView. I assume that by creating an NSArrayController object in IB for each tableView -- and setting its Object Class Name to correspond with the correct implementation file -- then all tableViews can co-exist in the same app. Yes?

Thanks again!
Scott




On Apr 27, 2006, at 10:40 AM, Ondra Cada wrote:

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




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

  • Prev by Date: Re: Quick newbie question regarding Prefix Header
  • Next by Date: Re: Design question
  • Previous by thread: Re: NSTableView app design
  • Next by thread: Re: NSTableView app design
  • Index(es):
    • Date
    • Thread