• 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: RS: going from the name of a method to the method itself
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RS: going from the name of a method to the method itself


  • Subject: Re: RS: going from the name of a method to the method itself
  • From: Jayson Adams <email@hidden>
  • Date: Mon, 27 Aug 2007 12:47:55 -0700


On Aug 27, 2007, at 12:42 PM, Roland Silver wrote:

Question: If I know the NAME of a method (as an NSString*) which one argument (an NSString*), how do I invoke that method with that arg?

You can use NSSelectorFromString() to get the SEL, and then performSelector:withObject: to invoke it on an object.


Best,


__jayson

Circus Ponies NoteBook - Organization for a Creative Mind
www.circusponies.com



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >RS: going from the name of a method to the method itself (From: Roland Silver <email@hidden>)

  • Prev by Date: NSTask setStandardOutput: then stringWithContentsOfFile gives empty string
  • Next by Date: Re: NSTask setStandardOutput: then stringWithContentsOfFile gives empty string
  • Previous by thread: RS: going from the name of a method to the method itself
  • Next by thread: Re: RS: going from the name of a method to the method itself
  • Index(es):
    • Date
    • Thread