diff options
-rw-r--r-- | Source/CustomQuery.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index 7eb04203..5eb3ddca 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -389,7 +389,7 @@ SEL callbackMethod = NULL; NSString *taskButtonString; - int i, totalQueriesRun = 0, totalAffectedRows = 0; + int i, j, totalQueriesRun = 0, totalAffectedRows = 0; double executionTime = 0; int firstErrorOccuredInQuery = -1; BOOL suppressErrorSheet = NO; @@ -467,8 +467,8 @@ theColumns = [streamingResult fetchFieldNames]; if(!tableReloadAfterEditing) { - for ( i = 0 ; i < [streamingResult numOfFields] ; i++) { - NSDictionary *columnDefinition = NSArrayObjectAtIndex(cqColumnDefinition,i); + for ( j = 0 ; j < [streamingResult numOfFields] ; j++) { + NSDictionary *columnDefinition = NSArrayObjectAtIndex(cqColumnDefinition,j); theCol = [[NSTableColumn alloc] initWithIdentifier:[columnDefinition objectForKey:@"datacolumnindex"]]; [theCol setResizingMask:NSTableColumnUserResizingMask]; [theCol setEditable:YES]; @@ -478,7 +478,7 @@ [dataCell setFont:([prefs boolForKey:SPUseMonospacedFonts]) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; [dataCell setLineBreakMode:NSLineBreakByTruncatingTail]; [theCol setDataCell:dataCell]; - [[theCol headerCell] setStringValue:NSArrayObjectAtIndex(theColumns, i)]; + [[theCol headerCell] setStringValue:NSArrayObjectAtIndex(theColumns, j)]; // Set the width of this column to saved value if exists and maps to a real column if ([columnDefinition objectForKey:@"org_name"] && [[columnDefinition objectForKey:@"org_name"] length]) { |