Next Page > Hide TOC

NSRelativeSpecifier Class Reference

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

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
Related Sample Code
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
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
Related Sample Code
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
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
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 Mac OS X v10.0 and later.

Declared in NSScriptObjectSpecifiers.h.

NSRelativeBefore

Specifies a position before another object.

Available in Mac OS X v10.0 and later.

Declared in NSScriptObjectSpecifiers.h.

Availability
Declared In
NSScriptObjectSpecifiers.h

Next Page > Hide TOC


© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-06-28)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.