Re: RS: going from the name of a method to the method itself
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