Revision: 6482
http://skim-app.svn.sourceforge.net/skim-app/?rev=6482&view=rev
Author: hofman
Date: 2010-04-22 15:15:53 +0000 (Thu, 22 Apr 2010)
Log Message:
-----------
log errors with scripts from script menu
Modified Paths:
--------------
trunk/SKScriptMenu.m
Modified: trunk/SKScriptMenu.m
===================================================================
--- trunk/SKScriptMenu.m 2010-04-22 14:45:10 UTC (rev 6481)
+++ trunk/SKScriptMenu.m 2010-04-22 15:15:53 UTC (rev 6482)
@@ -236,13 +236,22 @@
if (isAppleScriptUTI(theUTI)) {
NSDictionary *errorDictionary;
NSAppleScript *script = [[[NSAppleScript alloc]
initWithContentsOfURL:[NSURL fileURLWithPath:scriptFilename]
error:&errorDictionary] autorelease];
- NSAppleEventDescriptor *result = [script
executeAndReturnError:&errorDictionary];
- if (result == nil)
+ if (script == nil) {
+ NSLog(@"AppleScript file '%@' could not be opened: %@",
scriptFilename, errorDictionary);
NSBeep();
+ } else {
+ NSAppleEventDescriptor *result = [script
executeAndReturnError:&errorDictionary];
+ if (result == nil) {
+ NSLog(@"AppleScript file '%@' failed to execute: %@",
scriptFilename, errorDictionary);
+ NSBeep();
+ }
+ }
} else if (isApplicationUTI(theUTI)) {
BOOL result = [[NSWorkspace sharedWorkspace]
launchApplication:scriptFilename];
- if (result == NO)
+ if (result == NO) {
+ NSLog(@"Application '%@' could not be launched", scriptFilename);
NSBeep();
+ }
} else if (isAutomatorWorkflowUTI(theUTI)) {
[NSTask launchedTaskWithLaunchPath:@"/usr/bin/automator"
arguments:[NSArray arrayWithObjects:scriptFilename, nil]];
} else if ([[NSFileManager defaultManager]
isExecutableFileAtPath:scriptFilename]) {
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