NSAppleScript returning wrong error info
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