Re: NSAppleScript returning wrong error info
Re: NSAppleScript returning wrong error info
- Subject: Re: NSAppleScript returning wrong error info
- From: Nir Soffer <email@hidden>
- Date: Tue, 18 Mar 2008 16:14:24 +0200
On Mar 18, 2008, at 11:47, Vinay Prabhu wrote:
I am trying to create a NSAppleScript object using a applescript file.
The code is as follows,
NSDictionary* errorInfo;
NSAppleScript *script = [[NSAppleScriptalloc]
initWithContentsOfURL: scriptURL error: &errorInfo];
As per the documentation, on return 'errorInfo' should point to a
dictionary containing error messages.
No, the docs say:
"On return, if an error occurs, a pointer to an error information
dictionary."
If an no error occurs, the value is undefined. Check for errors by
testing the return value, not the error dictionary.
Best Regards,
Nir Soffer
_______________________________________________
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