Mac Developer Library

Developer

Foundation Framework Reference NSDeleteCommand Class Reference

Options
Deployment Target:

On This Page
Language:

NSDeleteCommand

An instance of NSDeleteCommand deletes the specified scriptable object or objects (such as words, paragraphs, and so on). More...

Inheritance


Conforms To


Import Statement


import Foundation @import Foundation;

Availability


Available in OS X v10.0 and later.
  • Returns a specifier for the object or objects to be deleted.

    Declaration

    Swift

    var keySpecifier: NSScriptObjectSpecifier! { get }

    Objective-C

    @property(readonly, retain) NSScriptObjectSpecifier *keySpecifier

    Return Value

    A specifier for the object or objects to be deleted.

    Discussion

    Note that this may be different than the specifier or specifiers set by setReceiversSpecifier:.

    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

    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 third rectangle of the first document, the receiver specifier is the first document while the key specifier is the third rectangle.

    Import Statement

    import Foundation

    Availability

    Available in OS X v10.0 and later.