• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: multiple methods named 'xxx' found.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple methods named 'xxx' found.


  • Subject: Re: multiple methods named 'xxx' found.
  • From: Nelson Santos <email@hidden>
  • Date: Fri, 5 Oct 2007 08:18:01 -0400

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: multiple methods named 'xxx' found.
      • From: "Daniel T. Staal" <email@hidden>
    • Re: multiple methods named 'xxx' found.
      • From: Nelson Santos <email@hidden>
References: 
 >Re: multiple methods named 'xxx' found. (From: Charles Steinman <email@hidden>)

  • Prev by Date: NSTextTable column width calculations?
  • Next by Date: Re: How does NSArrayController know?
  • Previous by thread: Re: multiple methods named 'xxx' found.
  • Next by thread: Re: multiple methods named 'xxx' found.
  • Index(es):
    • Date
    • Thread