diff options
author | stuconnolly <stuart02@gmail.com> | 2011-07-25 18:37:45 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2011-07-25 18:37:45 +0000 |
commit | b4b657cb8179c07f04392de54cd8c6875f12112d (patch) | |
tree | c1ca91de19fa77798db4c2f17c28721da719a803 /Source/SPCustomQuery.m | |
parent | df3c269342bcfb6fa343f16e10ad0b56f4b20852 (diff) | |
download | sequelpro-b4b657cb8179c07f04392de54cd8c6875f12112d.tar.gz sequelpro-b4b657cb8179c07f04392de54cd8c6875f12112d.tar.bz2 sequelpro-b4b657cb8179c07f04392de54cd8c6875f12112d.zip |
Tidy up.
Diffstat (limited to 'Source/SPCustomQuery.m')
-rw-r--r-- | Source/SPCustomQuery.m | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index b7d41bfa..1108e6d6 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -1467,21 +1467,29 @@ NSMutableArray *tempRow = [NSMutableArray array]; NSInteger i; - //set field names as first line - while ( (tableColumn = [enumerator nextObject]) ) { + // Set field names as first line + while ((tableColumn = [enumerator nextObject])) + { [tempRow addObject:[[tableColumn headerCell] stringValue]]; } + [currentResult addObject:[NSArray arrayWithArray:tempRow]]; - //add rows - for ( i = 0 ; i < [self numberOfRowsInTableView:customQueryView] ; i++) { + // Add rows + for (i = 0; i < [self numberOfRowsInTableView:customQueryView]; i++) + { [tempRow removeAllObjects]; + enumerator = [tableColumns objectEnumerator]; - while ( (tableColumn = [enumerator nextObject]) ) { + + while ((tableColumn = [enumerator nextObject])) + { [tempRow addObject:[self tableView:customQueryView objectValueForTableColumn:tableColumn row:i]]; } + [currentResult addObject:[NSArray arrayWithArray:tempRow]]; } + return currentResult; } |