weird NSAppleScript error
weird NSAppleScript error
- Subject: weird NSAppleScript error
- From: "James W. Walker" <email@hidden>
- Date: Sun, 20 Jul 2003 21:01:13 -0700
I have an AppleScript that compiles and runs fine in Script Editor, and
I'm trying to run it in Cocoa code, like so:
NSAppleScript* theScript = [[NSAppleScript alloc]
initWithSource: scriptStr];
if (theScript != NULL)
{
NSDictionary* errDict = NULL;
if (YES == [theScript compileAndReturnError: &errDict])
{
NSLog(@"compiled the script");
[theScript executeAndReturnError: &errDict];
}
[theScript release];
}
When I run this, the script fails to do what it's supposed to do, and
the Console shows:
2003-07-20 20:51:57.703 System Events[1463] CFLog (0):
CFPropertyListCreateFromXMLData(): plist parse failed; the data is not
proper UTF-8. The file name for this data could be:
/System/Library/CoreServices/System
Events.app/Contents/Resources/DiskFolderFile.scriptTerminology
The parser will retry as in 10.1, but the problem should be corrected
in the plist.
2003-07-20 20:51:57.990 System Preferences[1671] compiled the script
The complaint about the scriptTerminology file is apparently coming
from the compileAndReturnError: call, but since the "compiled the
script" message is reached. The scriptTerminology file is not XML at
all,
--
<
http://www.jwwalker.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.