aboutsummaryrefslogtreecommitdiffstats
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
parente1a704e83e3ac77f01847f532072bb75232430e4 (diff)
downloadsequelpro-558a543e667d17b624b921317177710fd2407ba6.tar.gz
sequelpro-558a543e667d17b624b921317177710fd2407ba6.tar.bz2
sequelpro-558a543e667d17b624b921317177710fd2407ba6.zip
- Replaces uses of the deprecated selectRow:byExtendingSelection: with selectRowIndexes:byExtendingSelection:
-rw-r--r--Source/CustomQuery.m2
-rw-r--r--Source/SPNarrowDownCompletion.m2
-rw-r--r--Source/SPTableView.m2
-rw-r--r--Source/TableContent.m6
-rw-r--r--Source/TableSource.m14
5 files changed, 13 insertions, 13 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 441144aa..8b8a8968 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -1546,7 +1546,7 @@
[queryFavorites insertObject:draggedRow atIndex:destinationRow];
[queryFavoritesView reloadData];
- [queryFavoritesView selectRow:destinationRow byExtendingSelection:NO];
+ [queryFavoritesView selectRowIndexes:[NSIndexSet indexSetWithIndex:destinationRow] byExtendingSelection:NO];
return YES;
} else {
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m
index 729e9e6d..27850bae 100644
--- a/Source/SPNarrowDownCompletion.m
+++ b/Source/SPNarrowDownCompletion.m
@@ -63,7 +63,7 @@
if(keyCode == key_movements[i].key)
{
int row = MAX(0, MIN([self selectedRow] + key_movements[i].rows, [self numberOfRows]-1));
- [self selectRow:row byExtendingSelection:NO];
+ [self selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
[self scrollRowToVisible:row];
return YES;
diff --git a/Source/SPTableView.m b/Source/SPTableView.m
index 801a528b..f52b44f5 100644
--- a/Source/SPTableView.m
+++ b/Source/SPTableView.m
@@ -52,7 +52,7 @@
return nil;
}
- [self selectRow:row byExtendingSelection:NO];
+ [self selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
[[self window] makeFirstResponder:self];
}
diff --git a/Source/TableContent.m b/Source/TableContent.m
index f796eca6..f08867f7 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -835,7 +835,7 @@
[tableValues addObject:newRow];
[tableContentView reloadData];
- [tableContentView selectRow:[tableContentView numberOfRows]-1 byExtendingSelection:NO];
+ [tableContentView selectRowIndexes:[NSIndexSet indexSetWithIndex:[tableContentView numberOfRows]-1] byExtendingSelection:NO];
isEditingRow = YES;
isEditingNewRow = YES;
currentlyEditingRow = [tableContentView selectedRow];
@@ -899,7 +899,7 @@
//select row and go in edit mode
[tableContentView reloadData];
- [tableContentView selectRow:[tableContentView selectedRow]+1 byExtendingSelection:NO];
+ [tableContentView selectRowIndexes:[NSIndexSet indexSetWithIndex:[tableContentView selectedRow]+1] byExtendingSelection:NO];
isEditingRow = YES;
isEditingNewRow = YES;
currentlyEditingRow = [tableContentView selectedRow];
@@ -1446,7 +1446,7 @@
}
// Saving failed - reselect the old row and return failure.
- [tableContentView selectRow:currentlyEditingRow byExtendingSelection:NO];
+ [tableContentView selectRowIndexes:[NSIndexSet indexSetWithIndex:currentlyEditingRow] byExtendingSelection:NO];
isSavingRow = NO;
return NO;
}
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];
}
}