presentError:
presentError:
- Subject: presentError:
- From: Quincey Morris <email@hidden>
- Date: Sat, 19 Apr 2008 12:47:51 -0700
(1) The HIG guidelines say, regarding alert icons:
"In rare cases, you may want to display a caution icon in your
alert, badged with the application icon as shown in Figure 14-48. A
badged alert is appropriate only if the user is performing a task,
such as installing software, and a possible side effect of that task
would be the inadvertent destruction of data. Don’t use a caution
icon for tasks whose only purpose is to overwrite or remove data,
such as Save or Empty Trash; too-frequent use of the caution icon
dilutes its significance."
Yet presentError: *always* chooses to use a badged caution icon,
AFAICT, even though there's no good reason to assume that an error in
general implies the possible "inadvertent destruction of data". For
example, NSDocumentController reports (via presentError:, I assume) a
failure to create or open a document with a caution icon, and in
neither case is it likely that data destruction is imminent.
(2) According to the NSResponder class reference for the alert
resulting from 'presentError:',
"The alert displays information found in the NSError object anError;
this information can include error description, recovery suggestion,
failure reason, and button titles (all localized)."
In fact, AFAICT the failure reason is never included in the alert --
the secondary (smaller) text always comes from the recovery suggestion
and the failure reason is ignored.
(3) According to the NSResponder class reference, a responder passes
presentError to the next error responder and:
"if there is no next responder, it passes the error object to NSApp,
which displays a document-modal error alert"
I had hoped this meant that NSApp cleverly displayed the error as a
sheet on the document window and waited for it to be dismissed. In
fact, if you send presentError: to a NSDocument you get an application-
modal alert.
Before I radar these as bugs, I though I'd see if anyone has any
comments. Maybe I misunderstand something.
_______________________________________________
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