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

Re: performSelector: question


  • Subject: Re: performSelector: question
  • From: Marco Scheurer <email@hidden>
  • Date: Tue, 27 Jul 2004 17:57:20 +0200

On Jul 27, 2004, at 5:34 PM, Bruce Truax wrote:
[...]
It would appear that the second method would work if I extracted the keyword
as follows:

id myClone = [anObject performSelector:sel_getUid([keywordString cString])
withObject:[restOfString]];

Is this the proper way to call a method using a string name?

Sure, but I would rather use:
clone = [anObject performSelector:NSSelectorFromString (keywordString)
withObject:restOfString];

Marco Scheurer
Sen:te, Lausanne, Switzerland http://www.sente.ch
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >performSelector: question (From: Bruce Truax <email@hidden>)

  • Prev by Date: Re: performSelector: question
  • Next by Date: Re: Dealloc is never being called and application crashes
  • Previous by thread: Re: performSelector: question
  • Next by thread: Default button surrounded by black square for Panther, not Jaguar
  • Index(es):
    • Date
    • Thread