Overriding NSDocument's "document could not be opened" error message
Overriding NSDocument's "document could not be opened" error message
- Subject: Overriding NSDocument's "document could not be opened" error message
- From: Glen Simmons <email@hidden>
- Date: Tue, 13 Jun 2006 17:32:31 -0500
My app has a feature that lets users password protect a document.
When opening a protected document, I display a dialog to enter the
password. This is initiated in -readFromURL:ofType:error: in my
NSDocument subclass. If the user clicks cancel in this password
dialog, I return NO from -readFromURL:ofType:error: so no document
will be created. The problem is that Cocoa helpfully displays an
error message saying "The document "Foo" could not be opened." Since
the user cancelled the operation, an error message here is not
appropriate. How do I keep that error from being displayed?
Thanks,
Glen Simmons
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden