From 3922ff7470f56072246f988f6f83756b754ab0ac Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sat, 14 Aug 2010 11:04:21 +0000 Subject: 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. --- Source/SPXMLExporter.m | 3 +++ Source/SPXMLExporterDelegate.m | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'Source') 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 @@ -106,6 +106,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) { @@ -123,12 +131,4 @@ [[exportProgressIndicator onMainThread] setDoubleValue:0]; } -/** - * - */ -- (void)xmlExportProcessWillBeginWritingData:(SPXMLExporter *)exporter -{ - [exportProgressIndicator setDoubleValue:[exporter exportProgressValue]]; -} - @end -- cgit v1.2.3