Ok, I'm back looking at this and the problem still exists in 10.5.1
I have some more info.
The failure only occurs when trying to get a property of the object.
If I send an command to the object it works fine. In addition, I can
see the following in the console with a debug build of my app:
Also, in my debug build I have a [valueForUndefinedKey:] set to log a
message - one never gets logged.
Can anyone tell me what's different between 10.5 and 10.4 that would
cause this error?
thanks.
On Nov 2, 2007, at 8:24 PM, Brian Bergstrand wrote:
I have a scriptable object defined as a property of the application
object. This is a Cocoa app. In 10.4.10, the following script works
great:
tell application "MyApp"
set obj to object controller
tell obj
get value
end tell
end tell
However, on 10.5 that same script fails with "The specified object
is a property, not an element." I am now building the app against
the 10.5 SDK but with 10.4 as the target OS. This build works on
10.4 the same as it did when built against the 10.4 SDK.
Here is the script event log on 10.5:
tell application "MyApp"
get object controller
object controller id "5482A687-CF01-46D3-875C-706488A9058E"
get value of object controller id "5482A687-
CF01-46D3-875C-706488A9058E"
"MyApp got an error: The specified object is a property, not an
element."
As you can see, the object is accessed via the ID property.
Any ideas of what's going on and how I can fix it?