• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Forcing the documentType in saveDocumentTo:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: WTF? How can this work?
  • Next by Date: Re: WTF? How can this work?
  • Previous by thread: JPEG Image retrieval
  • Next by thread: How to get the length of a string?
  • Index(es):
    • Date
    • Thread