diff options
Diffstat (limited to 'Source')
-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 |