ftp.nice.ch/peanuts/GeneralData/Documents/openstep/OpenStepSpec_rtf.tar.gz#/OpenStepSpec_rtf/ApplicationKit/Classes/NSOpenPanel.rtf

This is NSOpenPanel.rtf in view mode; [Download] [Up]

paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc.  All Rights Reserved.

s4 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSOpenPanel 
pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSSavePanel : NSPanel : NSWindow : NSResponder : NSObject
fs20 
fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding (NSResponder)
fi0 NSObject (NSObject)
fs20 
fs28 s7 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSOpenPanel.h 
fs20 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 
fs28 Class Description
fs14 
fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 
fs28 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. 
fs16 
fs28 Most of this class'27s behavior is defined by its superclass, NSSavePanel. NSOpenPanel adds to this behavior by:
fs16 
fs28 pard s3 li1231 fi-376 ri1007 ql tx1231 tx2872 tx3250 'b7tab Letting you specify the types (by file-name extension) of the items that will appear in the panel
fs16 
fs28 'b7tab Letting the user select files, directories, or both
fs16 
fs28 'b7tab Letting the user select multiple items at a time
fs16 
fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 Typically, you access an NSOpenPanel by invoking the b openPanelb0  method. When the class receives an b openPanelb0  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'27t modify the instance returned by b openPanelb0 , except through the methods listed below (and those inherited from its superclass, NSSavePanel). For example, you can set the panel'27s 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 b alloc...b0  and b init...b0  methods rather than the b openPanelb0  method.
fs16 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 
fs28 Accessing the NSOpenPanel 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 + (NSOpenPanel *)b openPanelb0 tab Returns an NSOpenPanel object having default initialization.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Filtering Files 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (BOOL)b allowsMultipleSelectiontab b0 Returns YES if the panel allows the user to open multiple files (and directories) at a time.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b canChooseDirectoriestab b0 Returns YES if the panel allows the user to choose directories.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b canChooseFilestab b0 Returns YES if the panel allows the user to choose files.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setAllowsMultipleSelection:b0 (BOOL)i flagi0 tab Sets whether the user can open multiple files (and directories) at a time.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setCanChooseDirectories:b0 (BOOL)i flagtab i0 Sets whether the user can choose directories.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setCanChooseFiles:b0 (BOOL)i flagtab i0 Sets whether the user can choose files.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Querying the Chosen Files 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSArray *)b filenamesb0 tab Returns an array containing the names of the selected files and directories.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Running the NSOpenPanel 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (int)b runModalForTypes:b0 (NSArray *)i fileTypesi0 tab Invokes the b runModalForDirectory:file:types:b0  method, using the last directory from which a file was chosen as the path argument. Returns the value returned by that method.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (int)b runModalForDirectory:b0 (NSString *)i pathi0 tab Displays the panel and begins its event loop. The panel
s9 li7030 fi-6553 fi-5796 b file:b0 (NSString *)i filenamei0 tab tab displays the files in i pathi0  that match the types in
b types:b0 (NSArray *)i fileTypesi0 tab tab i fileTypesi0  (an array of NSString objects), with i filenamei0  selected. Returns NSOKButton (if the user clicks the OK button) or NSCancelButton (if the user clicks the Cancel button).
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.