I have an NSTableView that I add objects to (through core data). I came across this in my searches:
NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:1];
[tableView selectRowIndexes:indexSet byExtendingSelection:NO];
which works, but the problem is when I replace 1 with [myarray count]
it doesn't select the last row.
My second question is when I have an IBAction hooked up to the table view to automatically call it when a row is selected, what is the sender? EDIT: Solved this one thanks to a good old NSLog
[myarray count]
and compare with your table datasource-(NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
return value – user756245