Question

I have an application that has the Viewer role for PDF files. Although my application does not edit the PDF files, it does allow the user to save the PDF file (if it is too large or complex for the workflow that my application handles).

When the SaveDocumentAs: method is called, I get the following warning:

Trying to save a document without any appropriate writable type defined.

I can avoid this warning, by changing my application's role to Editor, but do not want to make my application an editor, as the application attempts to create a blank PDF document when launched.

How can I avoid this warning without declaring my application to be an Editor for PDF files?

Was it helpful?

Solution

If you want to save with the document mechanism, you'll have to have the Editor role - that's my understanding. One simple way to have an editor role without creating a blank document on launch is to use the NSApplication delegate method:

-applicationShouldOpenUntitledFile:

Your answer to that delegate method, of course, would be "NO".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top