diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPTablesList.h | 1 | ||||
-rw-r--r-- | Source/SPTablesList.m | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Source/SPTablesList.h b/Source/SPTablesList.h index d85235ab..5b20c270 100644 --- a/Source/SPTablesList.h +++ b/Source/SPTablesList.h @@ -127,6 +127,7 @@ // Getters - (NSArray *)selectedTableNames; - (NSArray *)selectedTableItems; +- (NSArray *)selectedTableTypes; - (NSString *)tableName; - (NSInteger)tableType; - (NSArray *)tables; diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index bd428cbf..bd3d82b6 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -1108,6 +1108,20 @@ return selTables; } +- (NSArray *)selectedTableTypes +{ + NSIndexSet *indexes = [tablesListView selectedRowIndexes]; + + NSUInteger currentIndex = [indexes firstIndex]; + NSMutableArray *selTables = [NSMutableArray array]; + + while (currentIndex != NSNotFound) { + [selTables addObject:[filteredTableTypes objectAtIndex:currentIndex]]; + currentIndex = [indexes indexGreaterThanIndex:currentIndex]; + } + return selTables; +} + /** * Returns the currently selected table or nil if no table or mulitple tables are selected */ |