Re: class design issue
Re: class design issue
- Subject: Re: class design issue
- From: Bob Savage <email@hidden>
- Date: Wed, 30 Jan 2002 01:25:34 -0600
on 1/30/02 1:08 AM, email@hidden wrote:
>
>
I may be showing my static typing heritage here, but, won't the compiler
>
complain about not knowing about the method signature for someMethod?
>
is it considered kosher to compile code with warnings in it? (I'd
>
prefer to not import MainController.h)
>
Well you have three options that I know of:
[1] #import MainController.h -- but you said you didn't want to do that,
[2] ignore the compiler warnings -- I also prefer to not have compiler
warnings because I think it makes it difficult to see the real problems when
they arise.
[3] define a @protocol, import that header, and cast the id like so:
[ (id <MainController>)[[NSApplication sharedApplication] delegate]
someMethod ];
Maybe there are more ways of handling it than I know of.
Bob