diff options
author | stuconnolly <stuart02@gmail.com> | 2011-08-01 21:54:27 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2011-08-01 21:54:27 +0000 |
commit | e70486eb1503cad882a0d5e452fef3b2fecf6629 (patch) | |
tree | f98c83cfd6a015356bbab22ba956c9bec6f67a1f /Source/SPFavoritesExporter.m | |
parent | f3e65efba3f76cb2149fd8427af9463032d3c45d (diff) | |
download | sequelpro-e70486eb1503cad882a0d5e452fef3b2fecf6629.tar.gz sequelpro-e70486eb1503cad882a0d5e452fef3b2fecf6629.tar.bz2 sequelpro-e70486eb1503cad882a0d5e452fef3b2fecf6629.zip |
Work on importing favorites.
Diffstat (limited to 'Source/SPFavoritesExporter.m')
-rw-r--r-- | Source/SPFavoritesExporter.m | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Source/SPFavoritesExporter.m b/Source/SPFavoritesExporter.m index a818fdcf..cefa5190 100644 --- a/Source/SPFavoritesExporter.m +++ b/Source/SPFavoritesExporter.m @@ -29,6 +29,7 @@ @interface SPFavoritesExporter () - (void)_writeFavoritesInBackground; +- (void)_informDelegateOfExportCompletion:(NSError *)error; @end @@ -44,11 +45,8 @@ * @param favorites The array of favorites to be written * @param path The file system path that the file is to be written to * @param filename The filename of the file to be written - * @param error Upon return if an error occurred contains the NSError instance - * - * @return A BOOL indicating the success of the operation */ -- (void)writeFavorites:(NSArray *)favorites toFile:(NSString *)path error:(NSError **)error +- (void)writeFavorites:(NSArray *)favorites toFile:(NSString *)path { [self setExportFavorites:favorites]; [self setExportPath:path]; @@ -96,12 +94,19 @@ [errorString release]; } - // Inform the delegate that the export has completed and pass the error instance + [self _informDelegateOfExportCompletion:error]; + + [pool release]; +} + +/** + * Informs the delegate that the export process has completed. + */ + - (void)_informDelegateOfExportCompletion:(NSError *)error +{ if ([self delegate] && [[self delegate] respondsToSelector:@selector(favoritesExportCompletedWithError:)]) { [[self delegate] performSelectorOnMainThread:@selector(favoritesExportCompletedWithError:) withObject:error waitUntilDone:NO]; } - - [pool release]; } @end |