In my sdef, I have a command that accepts a parameter of type "Any".
In the script, I pass the reference to a scriptable object:
tell application "myApp"
set theArg to first subItem of appElement -- appElement is an element of the app object
myCommand theArg
end
In my command handler code, when fetching the parameter, I get back an object like this:
<NSAppleEventDescriptor: 'obj '{ 'form':'ID ', 'want':'Subi', 'seld':10900, 'from':'obj '{ 'form':'ID ', 'want':'Elem', 'seld':10900, 'from':null() } }>
Now, I like to resolve that back into an NSObject that represents the actual scripting object of "theArg". How do I do that? I can't find any evaluation functions in NSAppleEventDescriptor
, other than for simple types such as text, numbers and file references.