Re: Turn off duplicate method warning
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