Class

NSPositionalSpecifier

A specifier for an insertion point in a container relative to another object in the container.

Declaration

@interface NSPositionalSpecifier : NSObject

Overview

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.

Topics

Initializing a positional specifier

- initWithPosition:objectSpecifier:

Initializes a positional specifier with a given position relative to another given specifier.

Accessing information about a positional specifier

insertionContainer

Returns the container in which the new or copied object or objects should be placed.

insertionIndex

Returns an insertion index that indicates where the new or copied object or objects should be placed.

insertionKey

Returns the key that identifies the relationship into which the new or copied object or objects should be inserted.

insertionReplaces

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.

objectSpecifier

Returns the object specifier specified at initialization time.

position

Returns the insertion position specified at initialization time.

- setInsertionClassDescription:

Sets the class description for the object or objects to be inserted.

Evaluating a positional specifier

- evaluate

Causes the receiver to evaluate its position.

Constants

NSInsertionPosition

The following constants are defined by NSPositionalSpecifier to specify an insertion position.

Relationships

Inherits From

See Also

Object Specifiers

NSScriptObjectSpecifier

An abstract class used to represent natural language expressions.

NSPropertySpecifier

A specifier for a simple attribute value, a one-to-one relationship, or all elements of a to-many relationship.

NSRandomSpecifier

A specifier for an arbitrary object in a collection or, if not a one-to-many relationship, the sole object.

NSRangeSpecifier

A specifier for a range of objects in a container.

NSUniqueIDSpecifier

A specifier for an object in a collection (or container) by unique ID.

NSWhoseSpecifier

A specifier that indicates every object in a collection matching a condition.

NSNameSpecifier

A specifier for an object in a collection (or container) by name.

NSMiddleSpecifier

A specifier indicating the middle object in a collection or, if not a one-to-many relationship, the sole object.

NSIndexSpecifier

A specifier representing an object in a collection (or container) with an index number.

NSRelativeSpecifier

A specifier that indicates an object in a collection by its position relative to another object.