aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDump.m
diff options
context:
space:
mode:
authorbamse16 <marius@marius.me.uk>2009-05-05 12:24:43 +0000
committerbamse16 <marius@marius.me.uk>2009-05-05 12:24:43 +0000
commit2a4bbd2e425fbbf0ffd20a9c36921778b92963ae (patch)
tree2e3030c66bc4171066a37b0516eda38a1ec8a947 /Source/TableDump.m
parent4be832e7173836d78c91a8724c9dbfa14bd4b09f (diff)
downloadsequelpro-2a4bbd2e425fbbf0ffd20a9c36921778b92963ae.tar.gz
sequelpro-2a4bbd2e425fbbf0ffd20a9c36921778b92963ae.tar.bz2
sequelpro-2a4bbd2e425fbbf0ffd20a9c36921778b92963ae.zip
Issue 233: Option to copy field headings from result panels
Also replaced some NSLog with DLog/ALog
Diffstat (limited to 'Source/TableDump.m')
-rw-r--r--Source/TableDump.m21
1 files changed, 6 insertions, 15 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m
index e44e01ae..23db6cf5 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -193,7 +193,7 @@
contextInfo = @"exportMultipleTablesAsXML";
break;
default:
- NSLog(@"ERROR: unknown export item with tag %d", tag);
+ ALog(@"ERROR: unknown export item with tag %d", tag);
return;
break;
}
@@ -312,7 +312,7 @@
// Unknown operation
} else {
- NSLog(@"Unknown export operation: %@", [contextInfo description]);
+ ALog(@"Unknown export operation: %@", [contextInfo description]);
return;
}
@@ -391,7 +391,7 @@
// Load file into string. For SQL imports, try UTF8 file encoding before the current encoding.
if ([fileType isEqualToString:@"SQL"]) {
- NSLog(@"Attempting to read as utf8");
+ DLog(@"Attempting to read as utf8");
dumpFile = [SPSQLParser stringWithContentsOfFile:filename
encoding:NSUTF8StringEncoding
error:&errorStr];
@@ -407,7 +407,7 @@
// If the SQL-as-UTF8 read failed, and for CSVs, use the current connection encoding.
if (!importSQLAsUTF8 || [fileType isEqualToString:@"CSV"]) {
- NSLog(@"Reading using connection encoding");
+ DLog(@"Reading using connection encoding");
dumpFile = [SPSQLParser stringWithContentsOfFile:filename
encoding:[CMMCPConnection encodingForMySQLEncoding:[[tableDocumentInstance connectionEncoding] UTF8String]]
error:&errorStr];
@@ -505,8 +505,6 @@
////////////////
} else if ( [fileType isEqualToString:@"CSV"] ) {
- //NSLog(@"CSV Import...");
- //import csv file
int code;
NSPopUpButtonCell *buttonCell = [[NSPopUpButtonCell alloc] init];
@@ -1309,10 +1307,7 @@
/*
loads a csv string into an array
*/
-{
-
- //NSLog(@"In arrayForCSV...");
-
+{
NSMutableString *tempTerminated, *tempLineEnds;
NSMutableArray *tempArray = [NSMutableArray array];
NSMutableArray *tempRowArray = [NSMutableArray array];
@@ -1444,7 +1439,6 @@
}
//add row to tempArray
[tempArray addObject:[NSArray arrayWithArray:tempRowArray]];
- //NSLog(@"tempArray count: %d", [tempArray count]);
}
return [NSArray arrayWithArray:tempArray];
@@ -1871,7 +1865,6 @@
}
} else {
//add object to array
- //NSLog([string substringWithRange:NSMakeRange(start,(i-start))]);
[tempArray addObject:[string substringWithRange:NSMakeRange(start,(i-start))]];
start = i + 1;
}
@@ -2042,9 +2035,7 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn
}
- (void)dealloc
-{
- // NSLog(@"TableDump dealloc");
-
+{
[tables release];
[importArray release];
[fieldMappingButtonOptions release];