Retired Document
Important: This document is replaced by File System Programming Guide.
The Save and Open Panels
NSSavePanel
creates and manages a Save panel, and allows you to run the panel in a modal loop. The Save panel provides a simple way for a user to specify a file to use when saving a document or other data. It can restrict the user to files of a certain type, as specified by an extension. It also allows you to do several other things with the Save panel:
Add an accessory view to the panel.
Customize the user interface of the panel, including the Hide Extension check box and the New Folder button.
Modify the behavior of the panel through messages exchanged with a delegate.
NSOpenPanel
provides the Open panel for the Cocoa user interface. Applications use the Open panel as a convenient way to query the user for the name of a file to open. The Open panel can only be run modally.
Most of this class’s behavior is defined by its superclass, NSSavePanel
. NSOpenPanel
adds to this behavior by:
Letting you specify the types (by file-name extension or encoded HFS file type) of the items that will appear in the panel
Letting the user select files, directories, or both
Letting the user select multiple items at a time
Copyright © 2011 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2011-05-25