DekGenius.com
[ Team LiB ] Previous Section Next Section

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.

figs/cocn_1561.gif

@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
        relativeToWindow:(NSWindow*)window;
   - (int)runModalForTypes:(NSArray *)fileTypes;

    [ Team LiB ] Previous Section Next Section