Re: Typeing
Re: Typeing
- Subject: Re: Typeing
- From: "John C. Randolph" <email@hidden>
- Date: Wed, 27 Jun 2001 04:19:46 -0700
On Wednesday, June 27, 2001, at 02:30 AM, David Remahl wrote:
I have the following statement:
NSEnumerator* enum = [[[NSApp delegate] arrayOfObjects]
objectEnumerator];
I know that my application delegate responds to arrayOfObjects, but the
compiler doesn't [know what object is my app delegate], so it gives me
this warning:
warning: cannot find method
warning: return type for 'arrayOfObjects' defaults to id
The code doesn't break, since id is fine for this purpose, but the
warnings are annoying and hide the real warnings...
So, how do I statically type [NSApp delegate] so that the compiler
understands what I am trying to do?
It's not complaining about the type of the app delegate, it's
complaining because it hasn't seen *any* prototype for -arrayOfObjects.
Just #import whatever file -arrayOfObjects is declared in, and it should
quit giving you this warning.
-jcr
"These kids today don't know the simple joy of saving four bytes of
page-0 memory on a 6502" - unknown
References: | |
| >Typeing (From: David Remahl <email@hidden>) |