Return to the Alphabetic Index
Return to the Class Browser
Return to the Picture Browser
Copyright (c) 1994 by NeXT Computer, Inc. All Rights Reserved.

NSOpenPanel

Inherits From: NSSavePanel : NSPanel : NSWindow : NSResponder : NSObject

Conforms To: NSCoding (NSResponder) NSObject (NSObject)

Declared In: AppKit/NSOpenPanel.h

Class Description

NSOpenPanel provides the Open panel of the OpenStep 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) 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

Typically, you access an NSOpenPanel by invoking the openPanel method. When the class receives an openPanel message, it tries to reuse an existing panel rather than create a new one. If a panel is reused, its attributes are reset to the default values so that the effect is the same as receiving a new panel. Because Open panels may be reused, you shouldn't modify the instance returned by openPanel, except through the methods listed below (and those inherited from its superclass, NSSavePanel). For example, you can set the panel's title and whether it allows multiple selection, but not the arrangement of the buttons within the panel. If you must modify the Open panel substantially, create and manage your own instance using the alloc... and init... methods rather than the openPanel method.

Accessing the NSOpenPanel

Filtering Files

Querying the Chosen Files

Running the NSOpenPanel