Class

NSCloseCommand

A command that closes one or more scriptable objects.

Declaration

@interface NSCloseCommand : NSScriptCommand

Overview

An instance of NSCloseCommand closes the specified scriptable object or objects—typically a document or window (and its associated document, if any). The command may optionally specify a location to save in and how to handle modified documents (by automatically saving changes, not saving them, or asking the user).

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

Topics

Accessing save options

saveOptions

Returns a constant indicating how to deal with closing any modified documents.

Constants

NSSaveOptions

The saveOptions method returns one of the following constants to indicate how to deal with saving any modified documents:

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.

NSCloneCommand

A command that clones one or more scriptable objects.

NSCountCommand

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