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

NSAppleScript returning wrong error info


  • Subject: NSAppleScript returning wrong error info
  • From: Vinay Prabhu <email@hidden>
  • Date: Tue, 18 Mar 2008 15:17:36 +0530

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.

But strangely, on return, 'errorInfo' is not pointing to object of NSDictionary, instead it is
pointing to '_NSRepresentationInfo' object.


I have used the following code to find the class of 'errorInfo',
Class temp = [errorInfo class];
NSLog(@"%@", temp);

I can see the class type as _NSRepresentationInfo in console, on running the code.

Because of this, my application crashes, when I use NSDictionary API's like objectForKey, count etc on errorInfo.
The crash log shows,
[_NSRepresentationInfo count] selector not recognized


This happens when I run my application in Japanese language.
Any idea, why NSAppleScript is not returning NSDictionary object, when error occurs?


Any help is greatly appreciated.
Thanks and Regards
-Vinay
_______________________________________________

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: NSAppleScript returning wrong error info
      • From: Nir Soffer <email@hidden>
    • Re: NSAppleScript returning wrong error info
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: Re: Setting Web Proxy programmatically
  • Next by Date: Re: NSAppleScript returning wrong error info
  • Previous by thread: Re: Setting Web Proxy programmatically
  • Next by thread: Re: NSAppleScript returning wrong error info
  • Index(es):
    • Date
    • Thread