• 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
How to use "SEL"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: How to use "SEL"
      • From: Sherm Pendley <email@hidden>
    • Re: How to use "SEL"
      • From: Tomas Zahradnicky <email@hidden>
  • Prev by Date: Re: cString, (deprecated), lossyCString, fileSystemRepresentation, %@
  • Next by Date: Re: Can I get AppKit to draw this faster ?
  • Previous by thread: Re: NSEvent mouse events
  • Next by thread: Re: How to use "SEL"
  • Index(es):
    • Date
    • Thread