Re: performSelector and subclassing
Re: performSelector and subclassing
- Subject: Re: performSelector and subclassing
- From: Koen van der Drift <email@hidden>
- Date: Sun, 14 Nov 2004 14:54:40 -0500
On Nov 14, 2004, at 2:39 PM, Damien Bobillot wrote:
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.
Actually, the replacement of [MySubclass performer:] with [[self class]
performer:] does work, only the compiler gives the warning. If [self
class] is not appropriated, what would you suggest I use instead? I
have a couple of subclasses, so I cannot use [MySubclass
performSelector:] from the super, but need to replace it with whatever
subclass the class is. This is why I tried [self class] instead.
thanks,
- Koen.
_______________________________________________
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