ftp.nice.ch/peanuts/GeneralData/Documents/openstep/OpenStepSpec_rtf.tar.gz#/OpenStepSpec_rtf/ApplicationKit/Classes/NSSavePanel.rtf

This is NSSavePanel.rtf in view mode; [Download] [Up]

paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc.  All Rights Reserved.

s4 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSSavePanel 
pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSPanel : NSWindow : NSResponder : NSObject
fs20 
fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding (NSResponder)
fi0 NSObject (NSObject)
fs20 
fs28 s7 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSSavePanel.h
fs20 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 
fs28 Class Description
fs14 
fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 
fs28 NSSavePanel creates a Save panel. The Save panel provides a simple way for a user to specify a file to use when saving a document or other data. It can restrict the user to files of a certain type, as specified by a file name extension. 
fs16 
fs28 When the user decides on a file name, the message b panel:isValidFilename:b0  is sent to the NSSavePanel'27s delegate (if it responds to that message). The delegate can then determine whether that file name can be used; it returns YES if the file name is valid, or NO if the Save panel should stay up and wait for the user to type in a different file name.
fs16 
fs28 Typically, you access an NSSavePanel by invoking the b savePanelb0  method. When the class receives a b savePanelb0  message, it tries to reuse an existing panel rather than create a new one. When a panel is reused, its attributes are reset to the default values so that the effect is the same as receiving a new panel. Because a Save panel may be reused, you shouldn't modify the instance returned by b savePanelb0 , except through the methods listed below. For example, you can set the panel'27s title and required file type, but not the arrangement of the buttons within the panel. If you must modify the Save panel substantially, create and manage your own instance using the b alloc...b0  and b init...b0  methods rather than the b savePanelb0  method.
fs16 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 
fs28 Creating an NSSavePanel 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 +(NSSavePanel *)b savePaneltab b0 Returns an NSSavePanel object, creating it if necessary.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Customizing the NSSavePanel 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b setAccessoryView:b0 (NSView *)i aViewi0 tab Adds an application-customized view to the save panel. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSView *)b accessoryViewb0 tab Returns the application-customized view object. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setTitle:b0 (NSString *)i titlei0 tab Sets the title of the NSSavePanel to i titlei0 . 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSString *)b titleb0 tab Returns the title of the NSSavePanel.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setPrompt:b0 (NSString *)i prompti0 tab Sets the title of the form field for the path to i prompti0 .
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSString *)b promptb0 tab Returns the title of the form field for the path.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Setting Directory and File Type 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSString *)b requiredFileTypeb0 tab Gets the required file type (if any). 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setDirectory:b0 (NSString *)i pathi0 tab Sets the current directory of the NSSavePanel.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setRequiredFileType:b0 (NSString *)i typei0 tab Sets the required file type (if any). An empty string indicates that the user can save to any ASCII file.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setTreatsFilePackagesAsDirectories:b0 (BOOL)i flag
s9 li7030 fi-6553 fi-5796 i0 tab Sets whether the NSSavePanel object treats file packages as directories by showing their contents in the browser.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b treatsFilePackagesAsDirectoriestab b0 Returns YES if the NSSavePanel treats file packages as directories, thereby allowing users to browse the contents of file packages.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Running the NSSavePanel 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (int)b runModalForDirectory:b0 (NSString *)i pathi0 tab Displays the NSSavePanel and begins its event loop,
s9 li7030 fi-6553 fi-5796 b file:b0 (NSString *)i filenamei0 tab tab showing i pathi0  in the browser and selecting i filenamei0 . 
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (int)b runModalb0 tab Displays the NSSavePanel and begins its event loop. 
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Reading Save Information 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSString *)b directoryb0 tab Returns the directory that the chosen file resides in. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSString *)b filenameb0 tab Returns the absolute path name of the file to be saved.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Target and Action Methods 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b ok:b0 (id)i senderi0 tab Method invoked by the OK button. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b cancel:b0 (id)i senderi0 tab Method invoked by the Cancel button.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Responding to User Input 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b selectText:b0 (id)i senderi0 tab Invoked when users press Tab, Shift-Tab, or an arrow key.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Setting the Delegate 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b setDelegate:b0 (id)i anObjecti0 tab Makes i anObjecti0  the NSSavePanel'27s delegate. 
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Methods Implemented by the Delegate 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSComparisonResult)b panel:b0 (id)i senderi0 tab Returns NSOrderedDescending if i filename1i0  precedes
s9 li7030 fi-6553 fi-5796 b compareFilename:b0 (NSString *)i filename1i0 tab  i tab filename2i0 , NSOrderedAscending in the opposite case,
b with:b0 (NSString *)i filename2i0 tab  tab NSOrderedSame if the two are equivalent.
b caseSensitive:b0 (BOOL)i caseSensitivei0 tab  
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b panel:b0 (id)i senderi0 tab Returns YES if i filenamei0  should be displayed in the
s9 li7030 fi-6553 fi-5796 b shouldShowFilename:b0 (NSString *)i filenamei0 tab  tab browser. 
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b panel:b0 (id)i senderi0 tab Returns YES if i filenamei0  is acceptable to the delegate. 
s9 li7030 fi-6553 fi-5796 b isValidFilename:b0 (NSString*)i filename
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.