An instance of
NSDelete deletes the specified scriptable object or objects (such as words, paragraphs, and so on).
- macOS 10.0+
Suppose, for example, a user executes a script that sends the command
delete the third rectangle in the first document to the Sketch sample application (located in
/Developer/Examples/App). Cocoa creates an
NSDelete object to perform the operation. When the command is executed, it uses the key-value coding mechanism (by invoking
remove) to remove the specified object or objects from their container. See the description for
remove for related information.
NSDelete is part of Cocoa’s built-in scripting support. Most applications don’t need to subclass
NSDelete or call its methods.