Re: no method found returning 'id'
Re: no method found returning 'id'
- Subject: Re: no method found returning 'id'
- From: Jens Alfke <email@hidden>
- Date: Thu, 7 Feb 2008 20:05:31 -0800
On 7 Feb '08, at 6:28 PM, Torsten Curdt wrote:
While it's great that the "no method found" warnings are gone it
would still be great to understand what was the problem with the
other import. Was this a compile time check not having enough
information (because some definitions are missing) and the runtime
figuring it out just fine?
Yes: because ABPerson.h wasn't parsed, the compiler didn't know the
methods of the ABPerson class, so it warned you that the messages sent
to that class might not be valid. (But of course they are valid, which
is why it worked at runtime.)
It can be tempting to ignore such warnings; but you did the right
thing by trying to get rid of them. They often signal real mistakes,
like mistyping a method name or leaving behind a call to a method
whose definition you just deleted. In my own projects I always turn on
the "Treat warnings as errors" flag to make sure I can't get away
without fixing things like this.
—Jens_______________________________________________
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