Class

NSCloneCommand

A command that clones one or more scriptable objects.

Declaration

@interface NSCloneCommand : NSScriptCommand

Overview

An instance of NSCloneCommand clones the specified scriptable object or objects (such as words, paragraphs, images, and so on) and inserts them in the specified location, or the default location if no location is specified. The cloned scriptable objects typically correspond to objects in the application, but aren’t required to. This command corresponds to AppleScript’s duplicate command.

NSCloneCommand is part of Cocoa’s built-in scripting support. It works automatically to support the duplicate command through key-value coding. Most applications don’t need to subclass NSCloneCommand or invoke its methods.

When an instance of NSCloneCommand is executed, it clones the specified objects by sending them copyWithZone: messages.

Topics

Working with specifiers

keySpecifier

Returns a specifier for the object or objects to be cloned.

- setReceiversSpecifier:

Sets the receiver’s object specifier;.

Relationships

Inherits From

See Also

Script Commands

NSScriptCommand

A self-contained scripting statement.

NSQuitCommand

A command that quits the specified app.

NSSetCommand

A command that sets one or more attributes or relationships to one or more values.

NSMoveCommand

A command that moves one or more scriptable objects.

NSCreateCommand

A command that creates a scriptable object.

NSDeleteCommand

A command that deletes a scriptable object.

NSExistsCommand

A command that determines whether a scriptable object exists.

NSGetCommand

A command that retrieves a value or object from a scriptable object.

NSCountCommand

A command that counts the number of objects of a specified class in the specified object container.

NSCloseCommand

A command that closes one or more scriptable objects.