• 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
Custom NSTableView cells
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom NSTableView cells


  • Subject: Custom NSTableView cells
  • From: Randall Meadows <email@hidden>
  • Date: Tue, 9 Dec 2008 18:21:52 -0700

I could use a little guidance, please, on customizing cells for display in an NSTableView. (My app is Leopard-only.) I looked around the Apple docs and cocoadev, but didn't really find anything useful. Other pointers would be appreciated.

My table has but one column, but each cell in that column is made up of 2 or more views. I think I have what I need as far as the cells go, but it's feeding them to the table view that's giving me problems.

I know the "required" datasource methods are -numberOfRowsInTableView: and -tableView:objectValueForTableColumn:row:; the first is a no- brainer, the 2nd one stumps me.

I assume I must implement -tableView:dataCellForTableColumn:row: to feed the table my custom cells for each row, right? What purpose then does the -tableView:objectValueForTableColumn:row: method serve? What should be returned from that if I'm already feeding ready-made cells from the other one? (This table is not editable, so I do not need to worry about -tableView:setObjectValue....)


The docs also say that my cells must "properly" implement - copyWithZone:, but I don't know what "properly" means in that context.


Thanks!
randy
_______________________________________________

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


  • Follow-Ups:
    • Re: Custom NSTableView cells
      • From: j o a r <email@hidden>
    • Re: Custom NSTableView cells
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: How Can I Notify DrawRect Method?
  • Next by Date: Re: How Can I Notify DrawRect Method?
  • Previous by thread: Re: Symbol not found error
  • Next by thread: Re: Custom NSTableView cells
  • Index(es):
    • Date
    • Thread