Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Eraserhead

macrumors G4
Original poster
Nov 3, 2005
10,434
12,250
UK
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

macrumors 6502
Jul 25, 2006
294
0
Take a look at the NSTableView documentation. Look specifically at the

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

method.
 

Eraserhead

macrumors G4
Original poster
Nov 3, 2005
10,434
12,250
UK
kpua said:
Take a look at the NSTableView documentation. Look specifically at the

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

method.

Thanks, I should be able to get it sorted.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.