• 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
Re: How to customize NSDocument's error message 'The document ... could not be opened'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to customize NSDocument's error message 'The document ... could not be opened'


  • Subject: Re: How to customize NSDocument's error message 'The document ... could not be opened'
  • From: John Timmer <email@hidden>
  • Date: Mon, 19 Sep 2005 07:45:54 -0400

> John and mmalc, thanks for your answers. The problem
> is that neither of the methods
>
>     presentError:modalForWindow:delegate:didPresentSelector:contextInfo:
>     willPresentError:inError
>
> of my subclass of NSPersistentDocument gets called
> for the error alert "The document ... could not be
> opened." So overriding them as you suggest does not
> help.
>
> But using the debugger I found out that NSApplication's
> presentError: gets called, so I override
>
>     - (NSError *)application:willPresentError:
>
> in my application's delegate. This works fine.
>

Sorry about that - I hadn't run into this issue yet, so thanks for warning
me.  I guess it makes sense that when you don't successfully create a
document, it can't present an error.

JT

_______________________________________________
This mind intentionally left blank


 _______________________________________________
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

References: 
 >Re: How to customize NSDocument's error message 'The document ... could not be opened' (From: Kaspar Fischer <email@hidden>)

  • Prev by Date: File name encoding problem
  • Next by Date: Re: willChangeValueForKey, Ivars and Core Data
  • Previous by thread: Re: How to customize NSDocument's error message 'The document ... could not be opened'
  • Next by thread: Bindings&Actions on Document-based Applications
  • Index(es):
    • Date
    • Thread