Re: NSAppleScript's compileAndReturnError always succeeds
Re: NSAppleScript's compileAndReturnError always succeeds
- Subject: Re: NSAppleScript's compileAndReturnError always succeeds
- From: Andrew Farmer <email@hidden>
- Date: Thu, 4 Jun 2009 00:37:03 -0700
On 3 Jun 2009, at 19:47, Paul J. Lucas wrote:
Given that NSAppleScript objects are always supposed to run on the
main thread, I created a small "proxy" object to use:
<snip>
If I compile a valid script, it works as expected; however, if I
compile a gibberish script, e.g., "foo", compileAndReturnError
doesn't fail, i.e., it returns YES and errorDict is still nil.
Why?
Have you tried it with any other gibberish scripts? "foo" is a
syntactically valid script which returns the value of the variable foo
- it just happens to error out at runtime because the variable isn't
defined.
A better choice would be something like "$" which actually fails to
parse.
_______________________________________________
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