diff --git a/Classes/SBAppDelegate.m b/Classes/SBAppDelegate.m index f44ef72..f576dae 100644 --- a/Classes/SBAppDelegate.m +++ b/Classes/SBAppDelegate.m @@ -233,4 +233,20 @@ } +- (nullable __kindof NSDocument *)documentForURL:(NSURL *)url +{ + NSArray<__kindof NSDocument *> *documents = nil; + @synchronized(self) { + documents = [self.documents copy]; + } + + for (NSDocument *doc in documents) { + if ([doc.fileURL isEqualTo:url.filePathURL]) { + return doc; + } + } + + return nil; +} + @end diff --git a/Classes/SBDocument.m b/Classes/SBDocument.m index d0664c8..04e502d 100755 --- a/Classes/SBDocument.m +++ b/Classes/SBDocument.m @@ -200,6 +200,9 @@ return YES; } +/** + * Show the progress modal sheet. + */ - (void)showProgressSheet { self.progressBar.doubleValue = 0;