Re: How to notify of an error...
Re: How to notify of an error...
- Subject: Re: How to notify of an error...
- From: "Shawn Erickson" <email@hidden>
- Date: Tue, 6 Nov 2007 07:39:32 -0800
On 11/6/07, Tim Davis <email@hidden> wrote:
> Ok. I'm sorry if this sounds like a dumb question. Have only been
> doing Cocoa for about 3-4 months after switching from a Windows .NET
> environment, I don't know everything yet :)
>
> I have a class that at some point reads a one line file and parses the
> data (No I can not change this, it's reading a file from a 3rd party
> app, not my own). Well, if for some reason it encounters an error how
> do I notify the calling class?
>
> For instance: My main window controller will be the one that creates
> this object, the object will then at some point load the file, if it
> encounters an error how does it relay that information to the window
> controller so I can display a proper error message?
>
> I thought about just passing the window controller to the initWith
> section but to me that just seems like a waste of memory...
>
> In .NET I would use events, but I am not sure in Cocoa?
<http://developer.apple.com/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/index.html>
In particular...
<http://developer.apple.com/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/ErrorRespondRecover/chapter_3_section_2.html>
-Shawn
_______________________________________________
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