Mac Developer Library

Developer

Foundation Framework Reference NSSetCommand Class Reference

Options
Deployment Target:

On This Page
Language:

NSSetCommand

An instance of NSSetCommand sets one or more attributes or relationships to one or more values; for example, it may set the (x, y) coordinates for a window’s position or set the name of a document. More...

Inheritance


Conforms To


Import Statement


import Foundation @import Foundation;

Availability


Available in OS X v10.0 and later.
  • Returns a specifier that identifies the attribute or relationship that is to be set for the receiver of the set AppleScript command.

    Declaration

    Swift

    var keySpecifier: NSScriptObjectSpecifier { get }

    Objective-C

    @property(readonly, retain) NSScriptObjectSpecifier *keySpecifier

    Return Value

    A specifier that identifies the attribute or relationship that is to be set for the receiver of the set AppleScript command.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.

  • Sets the receiver’s object specifier.

    Declaration

    Swift

    func setReceiversSpecifier(_ receiversRef: NSScriptObjectSpecifier)

    Objective-C

    - (void)setReceiversSpecifier:(NSScriptObjectSpecifier *)receiversRef

    Parameters

    receiversRef

    The receiver’s object specifier.

    Discussion

    When the command is executed, it sets attributes or relationships in the objects specified by receiversRef.

    This method overrides setReceiversSpecifier: in NSScriptCommand. It performs the same function as the overridden method, with a critical difference: it causes the container specifier part of the passed-in object specifier to become the receiver specifier of the command, and the key part of the passed-in object specifier to become the key specifier. If, for example, receiversRef is a specifier for the color of the third rectangle, the receiver specifier is the third rectangle, while the key specifier is the color.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.