Re: How to defer NSDocument:writeToFile:ofType ?
Re: How to defer NSDocument:writeToFile:ofType ?
- Subject: Re: How to defer NSDocument:writeToFile:ofType ?
- From: "Erik M. Buck" <email@hidden>
- Date: Fri, 25 Jan 2002 13:03:04 -0600
Try overriding
saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:
- (void)saveToFile:(NSString *)fileName
saveOperation:(NSSaveOperationType)saveOperation delegate:(id)delegate
didSaveSelector:(SEL)didSaveSelector contextInfo:(void *)contextInfo
Called after the user has been given the opportunity to select a destination
through the modal save panel presented by
runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:. If
fileName is non-nil, this method writes the document to fileName, sets the
document's file location and document type (if a native type), and clears
the document's edited status. didSaveSelector gets called with YES if the
document is saved successfully, and NO otherwise.
didSaveSelector should have the following signature:
- (void)document:(NSDocument *)doc didSave:(BOOL)didSave contextInfo:(void
*)contextInfo
in you NSDocument subclass.
You could also catch the -save: and -saveAs: actions and hadle them
yourself.
You could use a modal sheet instead of a drawer.
----- Original Message -----