NSScriptObjectSpecifier | Mac OS X 10.0 |
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.
@interface NSScriptObjectSpecifier : NSObject <NSCoding>
|
// Initializers |
- (id)initWithContainerClassDescription:(NSScriptClassDescription *)classDesc containerSpecifier:(NSScriptObjectSpecifier *)container key:(NSString *)property; |
- (id)initWithContainerSpecifier:(NSScriptObjectSpecifier *)container key:(NSString *)property; |
// Accessor Methods |
- (void)setEvaluationErrorNumber:(int)error; |
- (int)evaluationErrorNumber;
|
- (void)setContainerIsObjectBeingTested:(BOOL)flag; |
- (BOOL)containerIsObjectBeingTested;
|
- (void)setChildSpecifier:(NSScriptObjectSpecifier *)child; |
- (NSScriptObjectSpecifier *)childSpecifier;
|
- (void)setKey:(NSString *)key; |
- (NSString *)key;
|
- (void)setContainerIsRangeContainerObject:(BOOL)flag; |
- (BOOL)containerIsRangeContainerObject;
|
- (void)setContainerClassDescription:(NSScriptClassDescription *)classDesc; |
- (NSScriptClassDescription *)containerClassDescription;
|
- (void)setContainerSpecifier:(NSScriptObjectSpecifier *)subRef; |
- (NSScriptObjectSpecifier *)containerSpecifier;
|
// Instance Methods |
- (NSScriptObjectSpecifier *)evaluationErrorSpecifier;
|
- (int *)indicesOfObjectsByEvaluatingWithContainer:(id)container count:(int *)count; |
- (NSScriptClassDescription *)keyClassDescription;
|
- (id)objectsByEvaluatingSpecifier;
|
- (id)objectsByEvaluatingWithContainers:(id)containers; |
// Methods Implementing NSCoding |
- (void)encodeWithCoder:(NSCoder *)aCoder; |
- (id)initWithCoder:(NSCoder *)aDecoder; |
NSIndexSpecifier, NSMiddleSpecifier, NSNameSpecifier, NSPropertySpecifier, NSRandomSpecifier, NSRangeSpecifier, NSRelativeSpecifier, NSUniqueIDSpecifier, NSWhoseSpecifier