| 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 |
Instances of NSPositionalSpecifier specify an insertion point in a container relative to another object in the container, for example, before first word or after paragraph 4. The container is specified by an instance of NSScriptObjectSpecifier. NSPositionalSpecifier objects commonly encapsulate object specifiers used as arguments to the make (create) and move commands and indicate where the created or moved object is to be inserted relative to the object represented by an object specifier.
Invoking an accessor method to obtain information about an instance of NSPositionalSpecifier causes the object to be evaluated if it hasn’t been already.
You don’t normally subclass NSPositionalSpecifier.
– insertionContainer
– insertionIndex
– insertionKey
– insertionReplaces
– objectSpecifier
– position
– setInsertionClassDescription:
Causes the receiver to evaluate its position.
- (void)evaluate
Calling insertionContainer, insertionKey, insertionIndex, or insertionReplaces also causes the receiver to be evaluated, if it hasn’t already been evaluated.
NSScriptObjectSpecifiers.hInitializes a positional specifier with a given position relative to another given specifier.
- (id)initWithPosition:(NSInsertionPosition)position objectSpecifier:(NSScriptObjectSpecifier *)specifier
The position for the new specifier relative to specifier.
The reference specifier.
An initialized positional specifier with the position specified by position relative to the object specified by specifier.
NSScriptObjectSpecifiers.hReturns the container in which the new or copied object or objects should be placed.
- (id)insertionContainer
A container. Determined by evaluating the receiver.
NSScriptObjectSpecifiers.hReturns an insertion index that indicates where the new or copied object or objects should be placed.
- (NSInteger)insertionIndex
An insertion index. Determined by evaluating the receiver.
NSScriptObjectSpecifiers.hReturns the key that identifies the relationship into which the new or copied object or objects should be inserted.
- (NSString *)insertionKey
A key. Determined by evaluating the receiver.
NSScriptObjectSpecifiers.hReturns a Boolean value that indicates whether evaluation has been successful and the object to be inserted should actually replace the keyed, indexed object in the insertion container.
- (BOOL)insertionReplaces
YES if evaluation has been successful and the object to be inserted should actually replace the keyed, indexed object in the insertion container, instead of being inserted before it; NO otherwise.
If this object has never been evaluated, evaluation is attempted.
NSScriptObjectSpecifiers.hReturns the object specifier specified at initialization time.
- (NSScriptObjectSpecifier *)objectSpecifier
An object specifier for a container.
NSScriptObjectSpecifiers.hReturns the insertion position specified at initialization time.
- (NSInsertionPosition)position
An insertion position.
NSScriptObjectSpecifiers.hSets the class description for the object or objects to be inserted.
- (void)setInsertionClassDescription:(NSScriptClassDescription *)classDescription
The class description for the object or objects to be inserted.
This message can be sent at any time after object initialization, but must be sent before evaluation to have any effect.
NSScriptObjectSpecifiers.hThe following constants are defined by NSPositionalSpecifier to specify an insertion position.
typedef enum {
NSPositionAfter,
NSPositionBefore,
NSPositionBeginning,
NSPositionEnd,
NSPositionReplace
} NSInsertionPosition;
NSPositionAfterSpecifies a position after another object.
Available in Mac OS X v10.0 and later.
Declared in NSScriptObjectSpecifiers.h.
NSPositionBeforeSpecifies a position before another object.
Available in Mac OS X v10.0 and later.
Declared in NSScriptObjectSpecifiers.h.
NSPositionBeginningSpecifies a position at the beginning of a collection.
Available in Mac OS X v10.0 and later.
Declared in NSScriptObjectSpecifiers.h.
NSPositionEndSpecifies a position at the end of a collection.
Available in Mac OS X v10.0 and later.
Declared in NSScriptObjectSpecifiers.h.
NSPositionReplaceSpecifies a position in the place of another object.
Available in Mac OS X v10.0 and later.
Declared in NSScriptObjectSpecifiers.h.
These constants are described in NSPositionalSpecifier.
NSScriptObjectSpecifiers.hLast updated: 2007-06-29