• 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: Turn off duplicate method warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Turn off duplicate method warning


  • Subject: Re: Turn off duplicate method warning
  • From: Rob Ross <email@hidden>
  • Date: Fri, 21 Jul 2006 07:38:05 -0700

On Jul 21, 2006, at 5:09 AM, Trygve Inda wrote:
I have two methods:

-(void)generate:(NSMutableDictionary *)dict

This is in my main AppController (and in AppController.h), and it calls

-(QTMovie *)generate:(NSMutableDictionary *)dict

which is in a different class that is loaded in a plug in. This one is
defined in a protocol file (which the AppController has to import). I get a
"duplicate method" warning. How can I get rid of this?


As the methods are in different classes, it should be fine (and the code
works without problem).


Thanks,

Trygve

I'm remembering something from class, and my memory tells me something about selectors being globally scoped. I.e., there's just one table that holds all the selectors, and I think the return type is not a sufficient discriminator. The second method would fail as an attempted method override, so maybe that's why you're getting the warning.


How do you invoke the second message call (what is the type of the reference you are using?) Is it an 'id'? If so, you might try casting it to the reference type of the actual Class or Protocol of the object instance.

Keep in mind I have just as much experience in Cocoa as you do, so maybe I'm the blind man trying to lead ;)


Rob Ross, Lead Software Engineer
E! Networks
---------------------------------------------------
"Beware of he who would deny you access to information, for in his heart he dreams himself your master." -- Commissioner Pravin Lal



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Turn off duplicate method warning
      • From: Trygve Inda <email@hidden>
References: 
 >Turn off duplicate method warning (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: How to make KVO setup persistent?
  • Next by Date: Re: Error with core data fetch requests: subentitiesByName misapplied, and segfaults
  • Previous by thread: Turn off duplicate method warning
  • Next by thread: Re: Turn off duplicate method warning
  • Index(es):
    • Date
    • Thread