NSCloseCommand Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in OS X v10.0 and later. |
| Companion guide | |
| Declared in | NSScriptStandardSuiteCommands.h |
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.
Instance Methods
saveOptions
Returns a constant indicating how to deal with closing any modified documents.
Return Value
A constant indicating how to deal with closing any modified documents. The default value returned is NSSaveOptionsAsk. See “Constants” for a list of possible return values.
Availability
- Available in OS X v10.0 and later.
Declared In
NSScriptStandardSuiteCommands.hConstants
NSSaveOptions
The saveOptions method returns one of the following constants to indicate how to deal with saving any modified documents:
typedef enum {
NSSaveOptionsYes = 0,
NSSaveOptionsNo,
NSSaveOptionsAsk
} NSSaveOptions;
Constants
NSSaveOptionsYesIndicates a modified document should be saved on closing without asking the user.
Available in OS X v10.0 and later.
Declared in
NSScriptStandardSuiteCommands.h.NSSaveOptionsNoIndicates a modified document should not be saved on closing.
Available in OS X v10.0 and later.
Declared in
NSScriptStandardSuiteCommands.h.NSSaveOptionsAskIndicates the user should be asked before saving any modified documents on closing. When no option is specified, this is the default.
Available in OS X v10.0 and later.
Declared in
NSScriptStandardSuiteCommands.h.
Availability
- Available in OS X v10.0 and later.
Declared In
NSScriptStandardSuiteCommands.h© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-06-28)