Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSReceiverEvaluationScriptError



I have a Cocoa application that gives me a NSReceiverEvaluationScriptError:3 on a script as simple as this:

tell MyApp
get name of widget 1
end tell


It complains against 'name' even though it does show up in the dictionary. It used to work. Although not that great in earlier builds. I get the same error with any of the other properties of a widget.

I'm suspecting that it's not returning a proper specifier for the widget. When I do the following I get an array of specifiers to my application.

tell MyApp
get widgets
end tell


The above returns
{ application "MyApp", application "MyApp", application "MyApp" }

I can get the name of window 1, but noting from my objects.

When I execute 'get widget 1', I get nothing in the result window. Although I know that my function for returning the array of widgets is called, and that it isn't empty.

Also, does anyone know how to handle named objects (i.e. document "Report 1") in Cocoa? I could end up having thousands of objects, that all need to be accessed by their text id, not their index. There doesn't appear to be any description of it in the docs.

TIA,
Brant




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.