• 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: 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


References: 
 >performSelector and subclassing (From: Koen van der Drift <email@hidden>)
 >Re: performSelector and subclassing (From: Damien Bobillot <email@hidden>)

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