From b4b657cb8179c07f04392de54cd8c6875f12112d Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 25 Jul 2011 18:37:45 +0000 Subject: Tidy up. --- Source/SPCustomQuery.m | 18 +++++++++++++----- 1 file 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; } -- cgit v1.2.3