The NSIndexSpecifier class represents an object in a collection (or container) with an index number. The script terms first and front specify the object with index 0, while last specifies the object with index of count-1. A negative index indicates a location by counting backward from the last object in the collection.


You don’t normally subclass NSIndexSpecifier.


Creating Index Specifiers

init(containerClassDescription: NSScriptClassDescription, containerSpecifier: NSScriptObjectSpecifier?, key: String, index: Int)

Initializes an allocated NSIndexSpecifier object with a class description, container specifier, collection key, and object index.

Accessing the Index

var index: Int

Sets the value of the receiver’s index property.