• 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 18:48:10 -0500


I tried:

temp = [[self class] performSelector: NSSelectorFromString( myRef )];

but got this warning from the compiler: `Class' may not respond to `+performSelector:'


I forgot to mention that the method that needs to be called by performSelector is a class method, which is why I need the name of the subclass to call performSelector. Thanks to some off-list emails, I solved it by casting [self class] with the super class:


temp = [(MySuper *) [self class] performSelector: NSSelectorFromString( myRef )];



cheers,

- 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: UDP sockets
  • Next by Date: Re: File Converting
  • Previous by thread: Re: performSelector and subclassing
  • Next by thread: Debugging an input manager?
  • Index(es):
    • Date
    • Thread