Re: multiple methods named 'xxx' found.
Re: multiple methods named 'xxx' found.
- Subject: Re: multiple methods named 'xxx' found.
- From: Nelson Santos <email@hidden>
- Date: Fri, 5 Oct 2007 08:45:43 -0400
Well, now that I think about this some more, in Cocoa it is possible
to send any message to any class object, isn't that right? Even if
the method isn't defined in that class (or anywhere). I suppose
that's where the compiler's confusion comes in. Am I on the ball, here?
Nelson
On Oct 5, 2007, at 8:18 AM, Nelson Santos wrote:
Hi Charles,
Thanks for the reply. Well, that's the part I don't get. Isn't
the compiler smart enough to choose the appropriate method based on
which object I am sending the message to? If I am calling a method
that is defined in the class of the object I am sending the message
to, why would the compiler even think that I intend to call a
completely unrelated class's method on my object? How is that even
possible if that is actually what I intended to do?
Nelson
On Oct 5, 2007, at 2:23 AM, Charles Steinman wrote:
--- Nelson Santos <email@hidden> wrote:
Hi all,
I found the below thread messages on the
Cocoabuilder site. Please
have a quick look. I understand what YMMV is
saying, but does anyone
know the reason why that warning occurs? Wouldn't
the fact that the
two methods are defined in different classes enough
to allow multiple
methods with the same name and different arguments
to exist?
I think it was explained pretty clearly in that
thread. Yes, the two methods can both exist, but the
compiler does not necessarily know which one you meant
to call at a given point.
Cheers,
Chuck
_____________________________________________________________________
_______________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
_______________________________________________
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:
40mac.com
This email sent to email@hidden
_______________________________________________
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