I have an NSTableView which shows the longitude and latitude points of objects on a map. Some objects, like trails, have many rows in the table. When I change objects I want to update the NSTableView and then select row 0. I tried
[obectCoordTable reloadData];
[objectCoordTable selectRowIndexes: [NSIndexSet indexSetWithIndex: 0] byExtendingSelection: NO];
This does not work because reloadData does not reload the table. It only schedules a reload for some time later
(on next iteration of Main Loop?). So my attempt to select row 0 happens first. Then just before the table
data are reloaded a (void)tableViewSelectionDidChange: happens with selected row reset to -1. So my
selection of row 0 is ineffective.
How do I select row 0 after the reload is finished? There seems to be no delegate method to notify the user
when a complete data reload is completed.
Do I have to schedule the selectRowIndexes for execution at a later time and hope it is after the data reload? That might work but seems a bit too hokey?
Thanks.
Richard Stover