/ Published in: Objective C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
if ([tableView selectedRow] != -1) { // Do something } } return [array count]; } - (id) tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex{ if (![[aTableColumn identifier] compare:@"Column 1"]) { valueToDisplay = [[array objectAtIndex:rowIndex] value1]; }else if (![[aTableColumn identifier] compare:@"Column 2"]) { valueToDisplay = [[array objectAtIndex:rowIndex] value2]; }else{ valueToDisplay = @"ERROR!"; } return valueToDisplay; }
Comments
