From 561fad23dfb635f76878c580ce4c132c15614276 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sun, 15 Aug 2010 15:03:19 +0000 Subject: =?UTF-8?q?=E2=80=A2=20forgotten=20to=20commit=20missing=20changes?= =?UTF-8?q?=20to=20commit=202534?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPTablesList.h | 1 + Source/SPTablesList.m | 14 ++++++++++++++ 2 files changed, 15 insertions(+) (limited to 'Source') 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 */ -- cgit v1.2.3