aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableSource.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-09-02 22:58:09 +0000
committerrowanbeentje <rowan@beent.je>2009-09-02 22:58:09 +0000
commit558a543e667d17b624b921317177710fd2407ba6 (patch)
tree7c9fa140f1694b7f8977cb0e2dc37e98ea8481ba /Source/TableSource.m
parente1a704e83e3ac77f01847f532072bb75232430e4 (diff)
downloadsequelpro-558a543e667d17b624b921317177710fd2407ba6.tar.gz
sequelpro-558a543e667d17b624b921317177710fd2407ba6.tar.bz2
sequelpro-558a543e667d17b624b921317177710fd2407ba6.zip
- Replaces uses of the deprecated selectRow:byExtendingSelection: with selectRowIndexes:byExtendingSelection:
Diffstat (limited to 'Source/TableSource.m')
-rw-r--r--Source/TableSource.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/TableSource.m b/Source/TableSource.m
index b34b5c2a..a2b62787 100644
--- a/Source/TableSource.m
+++ b/Source/TableSource.m
@@ -275,7 +275,7 @@ reloads the table (performing a new mysql-query)
atIndex:insertIndex];
[tableSourceView reloadData];
- [tableSourceView selectRow:insertIndex byExtendingSelection:NO];
+ [tableSourceView selectRowIndexes:[NSIndexSet indexSetWithIndex:insertIndex] byExtendingSelection:NO];
isEditingRow = YES;
isEditingNewRow = YES;
currentlyEditingRow = [tableSourceView selectedRow];
@@ -303,7 +303,7 @@ reloads the table (performing a new mysql-query)
[tempRow setObject:@"None" forKey:@"Extra"];
[tableFields addObject:tempRow];
[tableSourceView reloadData];
- [tableSourceView selectRow:[tableSourceView numberOfRows]-1 byExtendingSelection:NO];
+ [tableSourceView selectRowIndexes:[NSIndexSet indexSetWithIndex:[tableSourceView numberOfRows]-1] byExtendingSelection:NO];
isEditingRow = YES;
isEditingNewRow = YES;
currentlyEditingRow = [tableSourceView selectedRow];
@@ -630,7 +630,7 @@ fetches the result as an array with a dictionary for each row in it
}
// Saving failed - reselect the old row and return failure.
- [tableSourceView selectRow:currentlyEditingRow byExtendingSelection:NO];
+ [tableSourceView selectRowIndexes:[NSIndexSet indexSetWithIndex:currentlyEditingRow] byExtendingSelection:NO];
isSavingRow = NO;
return NO;
}
@@ -1206,9 +1206,9 @@ would result in a position change.
[tablesListInstance setContentRequiresReload:YES];
if ( originalRowIndex < destinationRowIndex ) {
- [tableSourceView selectRow:destinationRowIndex-1 byExtendingSelection:NO];
+ [tableSourceView selectRowIndexes:[NSIndexSet indexSetWithIndex:destinationRowIndex-1] byExtendingSelection:NO];
} else {
- [tableSourceView selectRow:destinationRowIndex byExtendingSelection:NO];
+ [tableSourceView selectRowIndexes:[NSIndexSet indexSetWithIndex:destinationRowIndex] byExtendingSelection:NO];
}
}
@@ -1276,10 +1276,10 @@ would result in a position change.
if ( column == 9 ) {
if ( [self addRowToDB] && [textView methodForSelector:command] == [textView methodForSelector:@selector(insertTab:)] ) {
if ( row < ([tableSourceView numberOfRows] - 1) ) {
- [tableSourceView selectRow:row+1 byExtendingSelection:NO];
+ [tableSourceView selectRowIndexes:[NSIndexSet indexSetWithIndex:row+1] byExtendingSelection:NO];
[tableSourceView editColumn:0 row:row+1 withEvent:nil select:YES];
} else {
- [tableSourceView selectRow:0 byExtendingSelection:NO];
+ [tableSourceView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
[tableSourceView editColumn:0 row:0 withEvent:nil select:YES];
}
}