Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/Foundation.framework |
Availability | Available in Mac OS X v10.0 and later. |
Companion guide | |
Declared in | NSScriptStandardSuiteCommands.h |
Related sample code |
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.
Returns a constant indicating how to deal with closing any modified documents.
- (NSSaveOptions)saveOptions
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.
NSScriptStandardSuiteCommands.h
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;
NSSaveOptionsYes
Indicates a modified document should be saved on closing without asking the user.
Available in Mac OS X v10.0 and later.
Declared in NSScriptStandardSuiteCommands.h
.
NSSaveOptionsNo
Indicates a modified document should not be saved on closing.
Available in Mac OS X v10.0 and later.
Declared in NSScriptStandardSuiteCommands.h
.
NSSaveOptionsAsk
Indicates the user should be asked before saving any modified documents on closing. When no option is specified, this is the default.
Available in Mac OS X v10.0 and later.
Declared in NSScriptStandardSuiteCommands.h
.
NSScriptStandardSuiteCommands.h
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-06-28)