• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
weird NSAppleScript error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Prev by Date: Re: Help: How do you start debugging this crashlog?
  • Next by Date: Re: libraries
  • Previous by thread: Re: Unicode mapping of strings: worth the effort?
  • Next by thread: determining encoding on documents
  • Index(es):
    • Date
    • Thread