NSSavePanel Mac OS X 10.0

This class is an implementation of the complete Mac OS X file Save dialog, which clients can use to present a file browser to users for saving files. It is possible to provide an accessory view to be displayed on the bottom part of the Save panel. Accessory views can be used to provide additional parameters that should be used in the Save operation. A graphics application, for example, may use the accessory view to provide controls for the user to specify compression and format options for the file to be saved.


@interface NSSavePanel : NSPanel
 // Accessor Methods
   - (void)setTreatsFilePackagesAsDirectories:(BOOL)flag;
   - (BOOL)treatsFilePackagesAsDirectories;
   - (void)setAccessoryView:(NSView *)aView;
   - (NSView *)accessoryView;
   - (void)setExtensionHidden:(BOOL)flag;
   - (void)setCanSelectHiddenExtension:(BOOL)flag;
   - (void)setDelegate:(id)anObject;
   - (void)setDirectory:(NSString *)path;
   - (NSString *)directory;
   - (void)setPrompt:(NSString *)prompt;
   - (NSString *)prompt;
   - (void)setTitle:(NSString *)title;
   - (NSString *)title;
   - (void)setRequiredFileType:(NSString *)type;
   - (NSString *)requiredFileType;
 // Class Methods
   + (NSSavePanel *)savePanel;
 // Instance Methods
   - (void)cancel:(id)sender;
   - (void)beginSheetForDirectory:(NSString *)path file:(NSString *)name modalForWindow:(NSWindow *)docWindow
        modalDelegate:(id)delegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo;
   - (NSURL *)URL;
   - (NSString *)filename;
   - (void)ok:(id)sender;
   - (int)runModal;
   - (int)runModalForDirectory:(NSString *)path file:(NSString *)name;
   - (int)runModalForDirectory:(NSString *)path file:(NSString *)name relativeToWindow:(NSWindow*)window;
   - (void)selectText:(id)sender;
   - (BOOL)isExpanded;
   - (BOOL)isExtensionHidden;
   - (void)validateVisibleColumns;
// Methods Implemented by the Delegate
   - (NSComparisonResult)panel:(id)sender compareFilename:(NSString *)file1 with:(NSString *)file2
   - (BOOL)panel:(id)sender  isValidFilename:(NSString *)filename;
   - (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename;
   - (NSString *)panel:(id)sender userEnteredFilename:(NSString *)filename confirmed:(BOOL)okFlag;
   - (void)panel:(id)sender willExpand:(BOOL)expanding;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes