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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to