On Tuesday, May 27, 2008, at 12:40PM, "Paul Sargent" <[EMAIL PROTECTED]> wrote:

>My question is what is accepted practice when I get an NSError back?  
>Reading the Error Handling Programming Guide I get the idea that  
>errors can be passed up the responder chain so that the user can be  
>alerted, and take action. Thing is, as I said, this is in a model  
>class (super is NSObject), so it isn't a responder and not part of the  
>responder chain. Nor is this a document based app, so I'm not using  
>NSDocument or NSDocumentController.
>
>I'd like to alert the user when things go wrong, but I don't see a way  
>of getting the NSError back to a responder. I feel like there's a  
>missing link somewhere.

In general, I think you're supposed to add NSError** parameters to pass it back 
up to some class that knows how to present an error, but I find that's not 
always practical, and it tends to be messy.  In such cases I typically take the 
easy way out and call [NSApp presentError:].

-- 
adam
_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [EMAIL PROTECTED]

Reply via email to