• 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: Customizing how errors are presented
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customizing how errors are presented


  • Subject: Re: Customizing how errors are presented
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 19 Feb 2010 09:29:18 -0800

On 2010 Feb 19, at 07:55, Dado Colussi wrote:

> I would like to customize how errors in controls like NSTextField
> are presented. The documentation for NSResponder recommends overriding
> -willPresentError: in order to customize error presentation. However, that
> doesn't let me customize *how* the error will be presented to the user. I am
> unhappy with the alerts because they interfere with the interaction by
> demanding immediate user attention.

From Apple's "Document-Based Applications Overview":
If you ... don't
want an error alert to be presented to the user, return an error
object whose domain is NSCocoaErrorDomain and whose code is
NSUserCancelledError. The Application Kit presents errors through
the NSApplication implementations of the presentError: and
presentError:modalForWindow:delegate:didPresentSelector:contextInfo:
methods declared by NSResponder. Those implementations silently
ignore errors whose domain is NSCocoaErrorDomain and whose code is
NSUserCancelledError.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Customizing how errors are presented (From: Dado Colussi <email@hidden>)

  • Prev by Date: selectItemWithObjectValue
  • Next by Date: Re: How to relayout content of NSTextView so that my tab characters are drawn with width of 4 characters
  • Previous by thread: Customizing how errors are presented
  • Next by thread: How to relayout content of NSTextView so that my tab characters are drawn with width of 4 characters
  • Index(es):
    • Date
    • Thread