NSIndexSpecifier Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in OS X v10.0 and later. |
| Companion guide | |
| Declared in | NSScriptObjectSpecifiers.h |
Overview
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.
Instance Methods
index
Returns the value receiver’s index property.
Return Value
Value of the receiver’s index property.
Availability
- Available in OS X v10.0 and later.
Declared In
NSScriptObjectSpecifiers.hinitWithContainerClassDescription:containerSpecifier:key:index:
Initializes an allocated NSIndexSpecifier object with a class description, container specifier, collection key, and object index.
Parameters
- classDescription
Description for the container of the collection.
- containerSpecifier
Container of the collection.
- collectionKey
Name of the collection.
- objectIndex
The object within the key collection the index specifier is to identify.
Return Value
Initialized NSIndexSpecifier object with its index property set to objectIndex.
Discussion
Invokes the super class’s initWithContainerClassDescription:containerSpecifier:key: method and sets the index property of the index specifier to objectIndex.
Availability
- Available in OS X v10.0 and later.
Declared In
NSScriptObjectSpecifiers.hsetIndex:
Sets the value of the receiver’s index property.
Parameters
- index
Value for the receiver’s
indexproperty.
Availability
- Available in OS X v10.0 and later.
Declared In
NSScriptObjectSpecifiers.h© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-04-01)