Hi all,
I have a simple question:
How to show serial nos. or (row no. + 1) in a table column using cocoa bindings and array controller?
I have made an application using cocoa bindings and array controller, in which I am displaying names of certain persons in a table column. The class from which I am displaying is named as: Person. Now I want to show serial nos. in first column, such that list gets displayed like this :
1 / John
2 / Peter
It is very easy to do if I use data source method:
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
I just need to return something like this :
return [NSString stringWithFormat:@"%d",rowIndex+1];
but I am not getting how to do this via cocoa binding and array controller.
Can anyone suggest me solution for it?
Thanks,
Miraaj