O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSSavePanel — Mac OS X 10.0

Synopsis

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.

image with no caption

@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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required