Forcing the documentType in saveDocumentTo:
Forcing the documentType in saveDocumentTo:
- Subject: Forcing the documentType in saveDocumentTo:
- From: Ken Tabb <email@hidden>
- Date: Mon, 20 Aug 2001 18:14:19 +0100
Hi,
how do I override [NSDocument saveDocumentTo] to be of a certain type?
Thanks to the folks on this list I'm able to open QuickTime movies and
save (document to) TIFFs, but in the Save To dialog I keep getting a
popup with QuickTime Movie and Tiff (the 2 defined document types) in,
and the default is QuickTime movie (presumably because that's the type of
doc being edited / used to open the doc), so you have to keep selecting
'Tiff' from the popup.
I don't need the option to save as QuickTime movie, only ever to Tiffs,
so I'd rather do away with the whole popup and just hardcode it to do
Tiffs. I understand I can force saveDocumentTo: to use a specific
document type, thus removing the popup. How do I do that... there seems
to be no mention of this in the NSDocument literature, either in the
save:, saveDocumentAs: or saveDocumentTo: methods, nor the preamble, nor
via any accessor methods for setting the document type.
I'm assuming I do something like:
- (IBAction)saveDocumentTo:(id)sender
{
[self doMagicalUndocumentedChangingOfDocType:@"TIFF"]; //the Tiff
docType is called 'TIFF'
return [super saveDocumentTo:sender];
}
Thanks in advance,
boy Ken
----------------------------------------------
Ken Tabb
Mac & UNIX Propellerhead & Network Bloke (Health & Human Sciences)
Computer Vision / Neural Network researcher (Computer Science)
University of Hertforfdshire
e-mail: email@hidden
http://www.health.herts.ac.uk/ken/
Certified non-Microsoft Solution Provider