Swift version of NSScriptObjectSpecifier initializers is unsatisfactory

Originator:olof
Number:rdar://20255125 Date Originated:3/22/2015
Status: Resolved:
Product: Product Version:
Classification: Reproducible:
 
The designated initializer for NSScriptObjectSpecifier is

    initWithContainerClassDescription:containerSpecifier:key:
 
note that the value for containerSpecifier is supposed to be nil in the case that the container is the application

In Swift, the analog is

        init(containerClassDescription classDesc: NSScriptClassDescription, containerSpecifier container: NSScriptObjectSpecifier, key property: String)

Note that the containerSpecifier is not an optional, so cannot be nil.  Thus there is no way to call the initializer and specify that the object is to be contained in the application.

Similar issues exist for the subclass NSNameSpecifier, which a client is actually likely to need.

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!