Mailing Lists: Apple Mailing Lists

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

Re: 10.5 bug?: "The specified object is a property, not an element."



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:

2007-11-27 19:05:00.032 MyApp[5472:813] Command: Intrinsics.get
Direct Parameter: <NSPropertySpecifier: ObjectController>
Receivers: <NSPropertySpecifier: ObjectController>
Arguments: {
}
2007-11-27 19:05:00.055 MyApp[5472:813] Gotten Value: <ISObjectController: 0x28af10>
2007-11-27 19:05:00.071 MyApp[5472:813] Result: <NSAppleEventDescriptor: 'obj '{ 'from':'null'(), 'want':'pRdC', 'form':'ID ', 'seld':'utxt'("5482A787-CF01-46D3-875C-706488F9058E") }>
2007-11-27 19:05:00.090 MyApp[5472:813] Error converting apple event to script command: -10008
2007-11-27 19:05:00.091 MyApp[5472:813] Original event: <NSAppleEventDescriptor: 'core'\'getd'{ '----':'obj '{ 'form':'prop', 'want':'prop', 'seld':'pCNC', 'from':'obj '{ 'form':'ID ', 'want':'pRdC', 'seld':'utxt'("5482A787-CF01-46D3-875C-706488F9058E"), 'from':'null'() } }, &'csig':65536 }>
2007-11-27 19:05:00.092 MyApp[5472:813] Offending object descriptor: <NSAppleEventDescriptor: 'obj '{ 'form':'ID ', 'want':'pRdC', 'seld':'utxt'("5482A787-CF01-46D3-875C-706488F9058E"), 'from':'null'() }>


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?

Brian Bergstrand
<http://www.bergstrand.org/brian/>   PGP Key ID: 0xB6C7B6A2


Brian Bergstrand <http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-implementors/email@hidden

This email sent to email@hidden
References: 
 >10.5 bug?: "The specified object is a property, not an element." (From: Brian Bergstrand <email@hidden>)



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.