NSOpenPanel Mac OS X 10.0

This subclass of NSSavePanel implements a Mac OS X Open panel with which users are presented a filesystem browser interface to choose files or directories for the application to open. The Open panel is created by invoking the class method openPanel, and is displayed onscreen using any of the runModal... or beginSheet... methods. After an Open panel has been closed by the user, an application can obtain an array of the selected files or directories as paths or URLs using the method filenames or URLs.


@interface NSOpenPanel : NSSavePanel
 // Accessor Methods
   - (void)setCanChooseDirectories:(BOOL)flag;
   - (BOOL)canChooseDirectories;
   - (void)setCanChooseFiles:(BOOL)flag;
   - (BOOL)canChooseFiles;
   - (void)setResolvesAliases:(BOOL)flag;
   - (BOOL)resolvesAliases;
   - (void)setAllowsMultipleSelection:(BOOL)flag;
   - (BOOL)allowsMultipleSelection;
 // Class Methods
   + (NSOpenPanel *)openPanel;
 // Instance Methods
   - (NSArray *)URLs;
   - (void)beginSheetForDirectory:(NSString *)path file:(NSString *)name types:(NSArray *)fileTypes
        modalForWindow:(NSWindow *)docWindow  modalDelegate:(id)delegate  didEndSelector:(SEL)didEndSelector
        contextInfo:(void *)contextInfo;
   - (NSArray *)filenames;
   - (int)runModalForDirectory:(NSString *)path file:(NSString *)name types:(NSArray *)fileTypes;
   - (int)runModalForDirectory:(NSString *)path file:(NSString *)name types:(NSArray *)fileTypes
   - (int)runModalForTypes:(NSArray *)fileTypes;

    Part II: API Quick Reference
    Chapter 13. Foundation Classes