How to use "SEL"
How to use "SEL"
- Subject: How to use "SEL"
- From: Ken Tozier <email@hidden>
- Date: Wed, 9 Oct 2002 01:48:49 -0400
I'm trying to write a general purpose loop method for one of my classes
that takes as one of its parameters the selector of another method
defined in the same class. Could someone fill in the blanks in the
following snippet?
// Is this the right way to get a selector for a hypothetical "doFoo"
method?
SEL theMethodSelector = [self selector:@selector( doFoo: )];
// and once I have the "SEL", I'd like to use it as follows
- (id) newWidget:(SEL) inSelector
{
// to actually use the selector what do I do?
[self **** ????****];
}
Thanks,
Ken Tozier
_______________________________________________
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.