Re: NSObjet respondsToSelector:method does not work when the method has arguments.
Re: NSObjet respondsToSelector:method does not work when the method has arguments.
- Subject: Re: NSObjet respondsToSelector:method does not work when the method has arguments.
- From: Julien Jalon <email@hidden>
- Date: Sat, 31 Aug 2002 02:02:59 +0200
Le samedi, 31 ao{ 2002, ` 01:35 Europe/Paris, Bruce Wittenmyer a icrit :
Anyone know how verify selectors with arguments? What I'm doing wrong?
':' are very important for the method signature so :
[...]
- (IBAction)clickedButton:(id)sender;
- (void)foo1;
- (void)foo2:(id)theArgs;
[...]
method1 =3D NSSelectorFromString(@"foo1");
method2 =3D NSSelectorFromString(@"foo2");
method2 = NSSelectorFromString(@"foo2:");
[...]
If your method is - myMethodWithArg:arg1 andArg:arg2, you will have to
use NSSelectorFromString(@"myMethodWithArg:andArg:")
--
Julien Jalon
http://www.julien-jalon.org/ -
http://nuxeo.com/
_______________________________________________
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.