Setting a documents file type during save as=8 5
Setting a documents file type during save as=8 5
- Subject: Setting a documents file type during save as=8 5
- From: Jonathan Wight <email@hidden>
- Date: Tue, 13 Jan 2004 13:51:53 -0600
In my NSDocument's -prepareSavePanel method I'm adding a pop-up menu to
allow the user to select the format to save the document as.
However I'm unsure where to make the changes necessary to actually
change the file type during the method that physically writes the file
(-[NSDocument writeToFile:ofType:] in this case).
I was tempted to call -[NSDocument setFileType:] from the file type
pop-up menu's action method but then realised that would apply to the
document even if the user cancelled the save (or if the save operation
was a 'save-to').
I was also thinking of overriding -[NSDocument
saveDocumentWithDelegate:didSaveSelector:contextInfo:] and/or
-[NSDocument
saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:] but
that would involve creating my own NSSavePanel and doing on the whole
way too much work for such a simple problem.
Has anyone encountered this before?
Cheers.
Jon.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.