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.h
Initializes 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.h
Returns the container in which the new or copied object or objects should be placed.
- (id)insertionContainer
A container. Determined by evaluating the receiver.
NSScriptObjectSpecifiers.h
Returns 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.h
Returns 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.h
Returns 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.h
Returns the object specifier specified at initialization time.
- (NSScriptObjectSpecifier *)objectSpecifier
An object specifier for a container.
NSScriptObjectSpecifiers.h
Returns the insertion position specified at initialization time.
- (NSInsertionPosition)position
An insertion position.
NSScriptObjectSpecifiers.h
Sets 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.h
The following constants are defined by NSPositionalSpecifier
to specify an insertion position.
typedef enum { NSPositionAfter, NSPositionBefore, NSPositionBeginning, NSPositionEnd, NSPositionReplace } NSInsertionPosition;
NSPositionAfter
Specifies a position after another object.
Available in Mac OS X v10.0 and later.
Declared in NSScriptObjectSpecifiers.h
.
NSPositionBefore
Specifies a position before another object.
Available in Mac OS X v10.0 and later.
Declared in NSScriptObjectSpecifiers.h
.
NSPositionBeginning
Specifies a position at the beginning of a collection.
Available in Mac OS X v10.0 and later.
Declared in NSScriptObjectSpecifiers.h
.
NSPositionEnd
Specifies a position at the end of a collection.
Available in Mac OS X v10.0 and later.
Declared in NSScriptObjectSpecifiers.h
.
NSPositionReplace
Specifies 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.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-06-29)