• 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
Re: NSAppleScript returning wrong error info
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: [Solved]NSAppleScript returning wrong error info
      • From: Vinay Prabhu <email@hidden>
References: 
 >NSAppleScript returning wrong error info (From: Vinay Prabhu <email@hidden>)

  • Prev by Date: Re: NSView enterFullScreenMode:withOptions: woes; window levels
  • Next by Date: Re: NSMatrix
  • Previous by thread: Re: NSAppleScript returning wrong error info
  • Next by thread: Re: [Solved]NSAppleScript returning wrong error info
  • Index(es):
    • Date
    • Thread