From: Joe Wreschnig Date: Tue, 26 Feb 2013 16:59:14 +0000 (+0100) Subject: Replace use of deprecated selectRow:byExtendingSelection:. X-Git-Tag: version-1.0~123 X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=912756bc7342b277d9648a4a128dbfc1a3d53d77;p=enjoyable.git Replace use of deprecated selectRow:byExtendingSelection:. --- diff --git a/ConfigsController.m b/ConfigsController.m index ce58f07..f6770cc 100644 --- a/ConfigsController.m +++ b/ConfigsController.m @@ -45,7 +45,7 @@ [removeButton setEnabled: ![config protect]]; [targetController load]; [(ApplicationController *)[[NSApplication sharedApplication] delegate] configChanged]; - [tableView selectRow: [configs indexOfObject: config] byExtendingSelection: NO]; + [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:[configs indexOfObject:config]] byExtendingSelection:NO]; } -(IBAction) addPressed: (id)sender { @@ -54,7 +54,7 @@ [configs addObject: newConfig]; [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged]; [tableView reloadData]; - [tableView selectRow: ([configs count]-1) byExtendingSelection: NO]; + [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:configs.count - 1] byExtendingSelection:NO]; [tableView editColumn: 0 row:([configs count]-1) withEvent:nil select:YES]; } -(IBAction) removePressed: (id)sender {