O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSScriptObjectSpecifier — Mac OS X 10.0

Synopsis

This is an abstract class for classes of objects known as object specifiers . An object specifier is a representation of a scripting language reference form that is used to identify objects in relation to container objects. Object specifiers are used to represent the portions of an AppleScript used to identify the object that is the target of a script command. For example, in the AppleScript get word 3 of paragraph 15 of the front document there are three object specifiers: word 3, paragraph 15, and front document.

Object specifiers are nested, where more general specifiers are evaluated to provide an evaluation context for their nested child specifier. In the example, the specifier front paragraph is evaluated first to provide a container in which the specifier paragraph 15 can be evaluated. The scripting system evaluates object specifiers in this way to determine what object in the application should be the recipient of the command being executed.

The Foundation framework implements several subclasses of NSScriptObjectSpecifier. These subclasses implement object specifiers that represent the various AppleScript language constructs (reference forms) used to identify the targets of script commands.

image with no caption

@interface NSScriptObjectSpecifier : NSObject <NSCoding>
                                  // Initializers
   - (id)initWithContainerClassDescription:(NSScriptClassDescription ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required