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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to