Revision: 14702
http://sourceforge.net/p/skim-app/code/14702
Author: hofman
Date: 2024-11-16 15:15:52 +0000 (Sat, 16 Nov 2024)
Log Message:
-----------
Use scripting insertion method to let app redirect to its delegate
Modified Paths:
--------------
trunk/SKDocumentController.m
Modified: trunk/SKDocumentController.m
===================================================================
--- trunk/SKDocumentController.m 2024-11-16 10:11:28 UTC (rev 14701)
+++ trunk/SKDocumentController.m 2024-11-16 15:15:52 UTC (rev 14702)
@@ -348,11 +348,10 @@
}
}
} else if (showNotes == NO && theURL) {
- BOOL success = [[NSApp delegate] application:NSApp
delegateHandlesKey:@"downloads"];
- if (success) {
- SKDownload *download = [[SKDownload alloc] initWithURL:theURL];
- [[(id)[NSApp delegate] mutableArrayValueForKey:@"downloads"]
addObject:download];
- }
+ SKDownload *download = [[SKDownload alloc] initWithURL:theURL];
+ BOOL success = YES;
+ @try { [NSApp insertValue:download inPropertyWithKey:@"downloads"]; }
+ @catch(id e) { success = NO; }
if (completionHandler)
completionHandler(nil, NO, success ? nil : [NSError
readFileErrorWithLocalizedDescription:NSLocalizedString(@"Unable to load file",
@"Error description")]);
} else if (completionHandler) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit