• 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
Overriding NSDocument's "document could not be opened" error message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: launch agent questions
  • Next by Date: LSIsAppleDefaultForType
  • Previous by thread: Re: No crashlog & my application is leaving me :-(
  • Next by thread: LSIsAppleDefaultForType
  • Index(es):
    • Date
    • Thread