Re: A niceMessage in MyDocument
Re: A niceMessage in MyDocument
- Subject: Re: A niceMessage in MyDocument
- From: "David W. Halliday" <email@hidden>
- Date: Tue, 19 Jun 2001 22:56:15 -0500
- Organization: Latin AmeriCom, formerly Latino Online
"David W. Halliday" wrote:
>
Joshua D. Orr wrote:
>
>
> Does your "MyWindowController.m" import the header file "MyDocument.h"? It
>
> can't find the method, that is it's first complaint. Always take the first
>
> complaint more seriously, because fixing the first one sometimes can fix
>
> other complaints... (I don't know about the rest of you, but it seems to
>
> happen that way to me a lot).
>
>
Oh, quite true. However, since the returned type of "[self document]" is
>
"id" (at least, according to the online documentation) including the
>
"MyDocument.h" file will do no good. (However, if the return type for "[self
>
document]" /were/ "id", the compiler /shouldn't/ be giving these errors. Maybe
>
the /actual/ return type is (NSDocument *).)
As I acknowledged in another email, I was confusing the warnings with the ones
created when the return type is static, rather than "id". So, while the "(null)"
result will not change one bit by including the "MyDocument.h" header file, it will
take care of /both/ warnings (since then it will know about at least /a/
"niceMessage" and it's return type). (I created a test program, and while I got the
same warnings, I got the desired result---not "(null)".)
>
>
>
> ...
>
...
>
> ...
>
>
>
> -Joshua D. Orr-
>
>
>
> ...
>
>
...
>
>
David ...
David email@hidden