Skip navigation.
 
mlRe: How to notify of an error...
FROM : Shawn Erickson
DATE : Tue Nov 06 16:39:32 2007

On 11/6/07, Tim Davis <binary.<email_removed>> 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

Related mailsAuthorDate
mlHow to notify of an error... Tim Davis Nov 6, 16:27
mlRe: How to notify of an error... Shawn Erickson Nov 6, 16:39
mlRe: How to notify of an error... I. Savant Nov 6, 16:43