AppleScript list properties don't behave the same as element lists

Originator:thedov
Number:rdar://19652418 Date Originated:29-Jan-2015 04:29 PM
Status:Open Resolved:
Product:OS X SDK Product Version:Mac OS X 10.10.1 (14B25)
Classification:Other Bug Reproducible:Always
 
Summary:
When you add a property to your scripting object that returns a list of objects in your app, you can’t query that list in a meaningful way. Using the statement “name of custom property” throws errors, whereas “name of every objectname” retrieves a list of strings.

Steps to Reproduce:
1. Decompress the attached sample project
2. Open the sample project in Xcode
3. Build and run
4. Open Test Script.applescript in Script Editor and run

Expected Results:
The first two statements log lists of names, and the third returns a list of names

Actual Results:
The first two work, the third throws an exception, even though the selectedMyObjects() method returns the exact same type as myObjects()

Regression:
It seems that an sdef defined like that has always worked this way, but it makes scripting an app very unfriendly, requiring the second line in my script as a workaround, which shouldn’t be necessary.

Notes:
Provide additional information, such as references to related problems, workarounds and relevant attachments.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!