• 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: performSelector and subclassing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: performSelector and subclassing
      • From: Koen van der Drift <email@hidden>
    • Re: performSelector and subclassing
      • From: Koen van der Drift <email@hidden>
References: 
 >performSelector and subclassing (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Re: Execute On-Load
  • Next by Date: Re: Debugging an input manager?
  • Previous by thread: performSelector and subclassing
  • Next by thread: Re: performSelector and subclassing
  • Index(es):
    • Date
    • Thread