• 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: Newbie: NSTableView & SQLite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: NSTableView & SQLite


  • Subject: Re: Newbie: NSTableView & SQLite
  • From: Chris Hanson <email@hidden>
  • Date: Tue, 24 Jun 2003 09:17:33 -0700

On Monday, June 23, 2003, at 07:35 PM, Vince Du Beau wrote:
Is it necessary to connect a NSTableView to a data source in IB or can you manually
add the rows.

Cocoa is somewhat strict about enforcing Model-View-Controller. Thus you can't "add rows" to a table view; the table view isn't a data container (Model), it's just a portal to some data (View). You need a data source (Controller) to bind the two together.

Table view data sources are very simple to write. If you're just displaying information, your data source object just needs to respond to the data source messages -numberOfRowsInTableView: and -tableView:objectValueForTableColumn:row:. See the documentation on the NSTableDataSource informal protocol for more details. (It's listed as a protocol, but you don't need to say your data source conforms to it and you don't need to implement all of the specified methods. This is why we say it's an "informal protocol.")

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Newbie: NSTableView & SQLite (From: Vince Du Beau <email@hidden>)

  • Prev by Date: Safari SDK
  • Next by Date: Re: cfsocket / upd monitoring
  • Previous by thread: Re: Newbie: NSTableView & SQLite
  • Next by thread: WebKitSDK - availability at installed base
  • Index(es):
    • Date
    • Thread