Next Page > Hide TOC

NSRangeSpecifier 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

An NSRangeSpecifier object specifies a range (that is, an uninterrupted series) of objects in a container through two delimiting objects. The range is represented by two object specifiers, a start specifier and an end specifier, which can be of any specifier type (such as NSIndexSpecifier or NSWhoseSpecifier object). These specifiers are evaluated in the context of the same container object as the range specifier itself.

You don’t normally subclass NSRangeSpecifier.

Tasks

Initializing a Range Specifier

Accessing a Range Specifier

Instance Methods

endSpecifier

Returns the object specifier representing the last object of the range.

- (NSScriptObjectSpecifier *)endSpecifier

Return Value

The object specifier representing the last object of the range.

Availability
Related Sample Code
Declared In
NSScriptObjectSpecifiers.h

initWithContainerClassDescription:containerSpecifier:key:startSpecifier:endSpecifier:

Returns a range specifier initialized with the given properties.

- (id)initWithContainerClassDescription:(NSScriptClassDescription *)classDescription containerSpecifier:(NSScriptObjectSpecifier *)container key:(NSString *)property startSpecifier:(NSScriptObjectSpecifier *)startSpec endSpecifier:(NSScriptObjectSpecifier *)endSpec

Parameters
classDescription

The class description.

container

The container.

property

The property.

startSpec

The object specifier representing the first object of the range.

endSpec

The object specifier representing the last object of the range.

Return Value

A range specifier initialized with the given properties.

Discussion

Invokes the super class’s initWithContainerClassDescription:containerSpecifier:key: method and initializes the instance with the object specifiers representing the starting element, startSpec, and the ending element, endSpec, of a range of elements in the container.

Availability
Declared In
NSScriptObjectSpecifiers.h

setEndSpecifier:

Sets the object specifier representing the last object of the range to a given object.

- (void)setEndSpecifier:(NSScriptObjectSpecifier *)endSpec

Parameters
endSpec

The object specifier representing the last object of the range.

Availability
Declared In
NSScriptObjectSpecifiers.h

setStartSpecifier:

Sets the object specifier representing the first object of the range to a given object.

- (void)setStartSpecifier:(NSScriptObjectSpecifier *)startSpec

Parameters
startSpec

The object specifier representing the first object of the range.

Availability
Declared In
NSScriptObjectSpecifiers.h

startSpecifier

Returns the object specifier representing the first object of the range.

- (NSScriptObjectSpecifier *)startSpecifier

Return Value

The object specifier representing the first object of the range.

Availability
Related Sample Code
Declared In
NSScriptObjectSpecifiers.h

Next Page > Hide TOC


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


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.