Presenting NSLocalizedFailureReasonErrorKey
Presenting NSLocalizedFailureReasonErrorKey
- Subject: Presenting NSLocalizedFailureReasonErrorKey
- From: Jerry Krinock <email@hidden>
- Date: Mon, 1 Oct 2007 11:15:49 -0700
Method -presentError: presents a modal dialog showing an NSError. It
shows the domain and the code, but not the
NSLocalizedFailureReasonErrorKey from the userInfo dictionary. Why
not? I must be doing something wrong. Is not
NSLocalizedFailureReasonErrorKey far more informative to the user
than the domain or code number?
Jerry Krinock
TEST CODE:
NSDictionary *userInfo ;
userInfo = [NSDictionary dictionaryWithObjectsAndKeys:
@"That dog won't hunt.", NSLocalizedFailureReasonErrorKey,
nil] ;
NSError* error ;
error = [NSError errorWithDomain:@"com.MyCompany.ErrorDomain"
code:123
userInfo:userInfo] ;
[[NSApplication sharedApplication] presentError:error] ;
EXPECTED RESULT:
A modal dialog saying something like:
"That dog won't hunt. com.MyCompany.ErrorDomain error #123"
ACTUAL RESULT:
A modal dialog saying only:
"com.MyCompany.ErrorDomain error #123"
_______________________________________________
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