Custom NSTableView cells
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