NSRelativeSpecifier 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
Related sample code

Overview

Specifies an object in a collection by its position relative to another object. You don’t normally subclass NSRelativeSpecifier.

Tasks

Initializing a Relative Specifier

Accessing a Relative Specifier

Instance Methods

baseSpecifier

Returns a specifier for the base object.

- (NSScriptObjectSpecifier *)baseSpecifier
Return Value

A specifier for the base object—the object to which the relative specifier is related.

Availability
  • Available in OS X v10.0 and later.
Declared In
NSScriptObjectSpecifiers.h

initWithContainerClassDescription:containerSpecifier:key:relativePosition:baseSpecifier:

Invokes the super class’s initWithContainerClassDescription:containerSpecifier:key: method and initializes the relative position and base specifier to relPos and baseSpecifier.

- (id)initWithContainerClassDescription:(NSScriptClassDescription *)classDescription containerSpecifier:(NSScriptObjectSpecifier *)specifier key:(NSString *)property relativePosition:(NSRelativePosition)relPos baseSpecifier:(NSScriptObjectSpecifier *)baseSpecifier
Availability
  • Available in OS X v10.0 and later.
Declared In
NSScriptObjectSpecifiers.h

relativePosition

Returns the relative position encapsulated by the receiver.

- (NSRelativePosition)relativePosition
Return Value

The relative position encapsulated by the receiver.

Availability
  • Available in OS X v10.0 and later.
Declared In
NSScriptObjectSpecifiers.h

setBaseSpecifier:

Sets the specifier for the base object.

- (void)setBaseSpecifier:(NSScriptObjectSpecifier *)baseSpecifier
Parameters
baseSpecifier

The specifier for the base object—the object to which the relative specifier is related.

Availability
  • Available in OS X v10.0 and later.
Declared In
NSScriptObjectSpecifiers.h

setRelativePosition:

Sets the relative position encapsulated by the receiver.

- (void)setRelativePosition:(NSRelativePosition)relPos
Parameters
relPos

The relative position encapsulated by the receiver.

Availability
  • Available in OS X v10.0 and later.
Declared In
NSScriptObjectSpecifiers.h

Constants

NSRelativePosition

These constants are used by relativePosition and setRelativePosition:.

typedef enum {
   NSRelativeAfter = 0,
   NSRelativeBefore
} NSRelativePosition;
Constants
NSRelativeAfter

Specifies a position after another object.

Available in OS X v10.0 and later.

Declared in NSScriptObjectSpecifiers.h.

NSRelativeBefore

Specifies a position before another object.

Available in OS X v10.0 and later.

Declared in NSScriptObjectSpecifiers.h.

Availability
  • Available in OS X v10.0 and later.
Declared In
NSScriptObjectSpecifiers.h