home *** CD-ROM | disk | FTP | other *** search
Wrap
{\rtf0\ansi\paperw16228 \paperh18648 \margl-907 \margr0 \margt0 \margb0 {\fonttbl\f0\fswiss Helvetica;\f1\froman Times;\f2\fmodern Courier;\f3\ftech Symbol;\f4\froman Palatino;} {\stylesheet{\s0 \li100 \fi0 \ri1007 \ql 1Head;} {\s1 \li100 \fi0 \ri1007 \ql ClassName;} {\s2 \li2872 \fi-2771 \ri1007 \ql \tx2872 ConformsTo;} {\s3 \li2872 \fi-2771 \ri1007 \ql DeclaredIn;} {\s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 Description;} {\s5 \li7030 \fi-5796 \ri1007 \ql DescriptionPart;} {\s6 \li0 \fi0 \ri0 \ql \tx-25 \tx8290 \tx9172 Footer;} {\s7 \li2872 \fi-2771 \ri1007 \ql \tx2872 InheritsFrom;} {\s8 \li100 \fi0 \ri1007 \ql Summary;} } \li0 \fi0 \ri0 \ql \sb0 \f1 \fs24 (Preliminary Documentation) Copyright \f3 \'e3\f1 1994 by NeXT Computer, Inc. All Rights Reserved.\ \ \s0 \li100 \fi0 \ri1007 \ql \f0 \b \fs36 \fs16 \ \ \ \ \ \ \ \fs36 NSSavePanel \ \pard \s7 \li2872 \fi-2771 \ri1007 \ql \tx2872 \f1 \b0 \fs28 \fs16 \ \ \ \fs28 \f0 \b \fs28 Inherits From: \b0 \fs28 \f1 NSPanel : NSWindow : NSResponder : NSObject \ \fs16 \ \fs28 \s3 \fs16 \fs28 \f0 \b \fs28 Declared In: \b0 \fs28 \f1 appkit/NSNSSavePanel.h \ \fs16 \ \fs28 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs28 \fs16 \ \ \fs28 Allocating, Creating and Freeing a NSSavePanel \ \fs16 \ \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 +(NSSavePanel *)\b savePanel \b0 Creates and returns a recyclable NSSavePanel object.\ \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \ \ \ \fs28 Customizing the NSSavePanel \ \fs16 \ \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (void)\b setAccessoryView:\b0 (NSView *)\i aView\i0 Adds an application-customized view to the save panel. \ \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSView *)\b accessoryView\b0 Returns the application-customized view object. \ \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setTitle:\b0 (NSString *)\i title\i0 Sets the title of the NSSavePanel to \i title\i0 . \ \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSString *)\b title\b0 Returns the title of the NSSavePanel.\ \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setPrompt:\b0 (NSString *)\i prompt\i0 Sets the title of the form field for the path to \i prompt\i0 .\ \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSString *)\b prompt\b0 Returns the title of the form field for the path.\ \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \ \ \ \fs28 Setting Directory and File Type \ \fs16 \ \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (NSString *)\b requiredFileType\b0 Gets the required file type (if any). \ \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setDirectory:\b0 (NSString *)\i path\i0 Sets the current directory of the NSSavePanel.\ \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setRequiredFileType:\b0 (NSString *)\i type\i0 Sets the required file type (if any). \ \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setTreatsFilePackagesAsDirectories:\b0 (BOOL)\i flag\ \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0 Sets whether the NSSavePanel object treats file packages as directories by showing their contents in the browser.\ \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (BOOL)t\b reatsFilePackagesAsDirectories \b0 Returns YES if the NSSavePanel treats file packages as directories, thereby allowing users to browse the contents of file packages.\ \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \ \ \ \fs28 Running the NSSavePanel \ \fs16 \ \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (int)\b runModalForDirectory:\b0 (NSString *)\i path\i0 Displays the NSSavePanel and begins its event loop,\ \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b file:\b0 (NSString *)\i filename\i0 showing \i path\i0 in the browser and selecting \i filename\i0 . \ \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (int)\b runModal\b0 Displays the NSSavePanel and begins its event loop. \ \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \ \ \ \fs28 Reading Save Information \ \fs16 \ \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (NSString *)\b directory\b0 Returns the directory that the chosen file resides in. \ \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSString *)\b filename\b0 Returns the full name of the file to be saved.\ \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \ \ \ \fs28 Target and Action Methods \ \fs16 \ \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (void)\b ok:\b0 (id)\i sender\i0 Method invoked by the OK button. \ \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b cancel:\b0 (id)\i sender\i0 Method invoked by the Cancel button.\ \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \ \ \ \fs28 Responding to User Input \ \fs16 \ \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (void)\b selectText:\b0 (id)\i sender\i0 Invoked when users press Tab, Shift-Tab, or an arrow key.\ \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \ \ \ \fs28 Setting the Delegate \ \fs16 \ \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (void)\b setDelegate:\b0 (id)\i anObject\i0 Makes \i anObject\i0 the NSSavePanel\'27s delegate. \ \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \ \ \ \fs28 Methods implemented by the Delegate \ \fs16 \ \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (NSComparisonResult)\b panel:\b0 (id)\i sender\i0 Returns NSOrderedDescending if \i filename1\i0 precedes\ \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b compareFilename:\b0 (NSString *)\i filename1\i0 \i filename2\i0 , NSOrderAscending in the opposite case,\ \b with:\b0 (NSString *)\i filename2\i0 NSOrderedSame if the two are equivalent.\ \b caseSensitive:\b0 (BOOL)\i caseSensitive\i0 \ \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (BOOL)\b panel:\b0 (id)\i sender\i0 Returns YES if \i filename\i0 should be displayed in the\ \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b shouldShowFilename:\b0 (NSString *)\i filename\i0 browser. \ \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (BOOL)\b panel:\b0 (id)\i sender\i0 Returns YES if \i filename\i0 is acceptable to the delegate. \ \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b isValidFilename:\b0 (NSString*)\i filename\ \pard \s0 \li100 \fi0 \tx478 \tx856 \tx1234 \i0 \fs28 \fs16 \ \ \fs28 \ \fs16 \ \ \fs28 \ri1007 \fs16 \fs28 \ \fs16 \ \ \fs28 \fs16 \fs28 \ \fs16 \ \ \fs28 }