diff options
author | stuconnolly <stuart02@gmail.com> | 2010-08-14 11:04:21 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-08-14 11:04:21 +0000 |
commit | 3922ff7470f56072246f988f6f83756b754ab0ac (patch) | |
tree | fa6ee645b8746bf83f1b25d92a615269cf6470e3 | |
parent | f1e829f98f50d9e75e7ba111361a625f7aab802d (diff) | |
download | sequelpro-3922ff7470f56072246f988f6f83756b754ab0ac.tar.gz sequelpro-3922ff7470f56072246f988f6f83756b754ab0ac.tar.bz2 sequelpro-3922ff7470f56072246f988f6f83756b754ab0ac.zip |
Fix the display and updating of the export progress sheet when performing an XML export. Caused by the incorrect implementation of XML export delegate methods as well as a missing call to one of them during the export process.
-rw-r--r-- | Source/SPXMLExporter.m | 3 | ||||
-rw-r--r-- | Source/SPXMLExporterDelegate.m | 16 |
2 files changed, 11 insertions, 8 deletions
diff --git a/Source/SPXMLExporter.m b/Source/SPXMLExporter.m index 2da40220..83497ec4 100644 --- a/Source/SPXMLExporter.m +++ b/Source/SPXMLExporter.m @@ -129,6 +129,9 @@ currentPoolDataLength = 0; + // Inform the delegate that we are about to start writing the data to disk + [delegate performSelectorOnMainThread:@selector(xmlExportProcessWillBeginWritingData:) withObject:self waitUntilDone:NO]; + while (1) { // Check for cancellation flag diff --git a/Source/SPXMLExporterDelegate.m b/Source/SPXMLExporterDelegate.m index 5aa01ba8..17748bdc 100644 --- a/Source/SPXMLExporterDelegate.m +++ b/Source/SPXMLExporterDelegate.m @@ -107,6 +107,14 @@ */ - (void)xmlExportProcessProgressUpdated:(SPXMLExporter *)exporter { + [[exportProgressIndicator onMainThread] setDoubleValue:[exporter exportProgressValue]]; +} + +/** + * + */ +- (void)xmlExportProcessWillBeginWritingData:(SPXMLExporter *)exporter +{ // Only update the progress text if this is a table export if (exportSource == SPTableExport) { [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing data...", @"export label showing app if writing data for a specific table"), currentTableExportIndex, exportTableCount, [exporter xmlTableName]]]; @@ -123,12 +131,4 @@ [[exportProgressIndicator onMainThread] setDoubleValue:0]; } -/** - * - */ -- (void)xmlExportProcessWillBeginWritingData:(SPXMLExporter *)exporter -{ - [exportProgressIndicator setDoubleValue:[exporter exportProgressValue]]; -} - @end |