About NSAppleScriptErrorNumber = -2709
About NSAppleScriptErrorNumber = -2709
- Subject: About NSAppleScriptErrorNumber = -2709
- From: xiaobin <email@hidden>
- Date: Tue, 9 Dec 2008 10:54:05 +0900
hi,
I am writing application A and application B using Object-C++ and Object-C.
A include restart OS code by using apple script to tell finder to restart os.
the code is following :
NSDictionary *error = nil;
NSAppleScript *script = [[[NSAppleScript alloc] initWithSource:@"tell
application \"Finder\"\nrestart\nend tell"] autorelease];
[script executeAndReturnError:&error];
I want that App B call App A to restart OS. But it is failed([script
executeAndReturnError:&error] == nil ).
( I found It is OK that calling restart OS code from App A directly)
I got the error number and message.
NSAppleScriptErrorNumber = -2709
the error message is "Can't get the event dictionary" .
It sounds like the apple event dictionary can not be found or something else.
But I don't know what it means concretely and how to fix the problem.
I have this question for several days. I can't find any information about this.
Anyone can help me?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden