Re: performSelector and subclassing
Re: performSelector and subclassing
- Subject: Re: performSelector and subclassing
- From: Damien Bobillot <email@hidden>
- Date: Sun, 14 Nov 2004 20:39:57 +0100
Le 14 nov. 04, à 20:26, Koen van der Drift a écrit :
In the subclasses I have this line:
temp = [MySubclass performSelector: NSSelectorFromString(
myRef )];
MySubclass is a class (type Class) or an object (type id) ?
I think it's an object, because a class did not respond to
"+performSelector:" (see NSObject doc). However in this case, it should
work and using [self class] is not appropriated.
I would like to move that line up to the super class. What happens now
is that performSelector is called with MySuper, instead of MySubclass
(which is what I want to happen).
I tried:
temp = [[self class] performSelector: NSSelectorFromString(
myRef )];
but got this warning from the compiler: `Class' may not respond to
`+performSelector:'
--
Damien Bobillot
_______________________________________________
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