PDA

View Full Version : Cocoa Table Question




Eraserhead
Aug 24, 2006, 03:53 PM
I am (trying to) create a Cocoa app atm, and have a table I would like to display. In the first column I would like to simply display the entry number (starting from 1 if possible, like how it is displayed in Interface Builder.) and in the second the relevant value. I am reading through Cocoa, Programming for OS X (which is excellent) and this seems similar to the RaiseMan Application except that I just want the entry number instead of the persons name in the first column. How would you code this?

Thanks



kpua
Aug 24, 2006, 04:26 PM
Take a look at the NSTableView documentation. Look specifically at the

-(id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex

method.

Eraserhead
Aug 24, 2006, 05:28 PM
Take a look at the NSTableView documentation. Look specifically at the

-(id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex

method.

Thanks, I should be able to get it sorted.