| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in Mac OS X v10.0 and later. |
| Companion guide | |
| Declared in | NSScriptObjectSpecifiers.h |
| Related sample code |
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.
Returns the value receiver’s index property.
- (NSInteger)index
Value of the receiver’s index property.
NSScriptObjectSpecifiers.hInitializes an allocated NSIndexSpecifier object with a class description, container specifier, collection key, and object index.
- (id)initWithContainerClassDescription:(NSScriptClassDescription *)classDescription containerSpecifier:(NSScriptObjectSpecifier *)containerSpecifier key:(NSString *)collectionKey index:(NSInteger)objectIndex
Description for the container of the collection.
Container of the collection.
Name of the collection.
The object within the key collection the index specifier is to identify.
Initialized NSIndexSpecifier object with its index property set to objectIndex.
Invokes the super class’s initWithContainerClassDescription:containerSpecifier:key: method and sets the index property of the index specifier to objectIndex.
NSScriptObjectSpecifiers.hSets the value of the receiver’s index property.
- (void)setIndex:(NSInteger)index
Value for the receiver’s index property.
NSScriptObjectSpecifiers.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-04-01)