• 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: Pointers to methods (or functions, for that matter)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pointers to methods (or functions, for that matter)


  • Subject: Re: Pointers to methods (or functions, for that matter)
  • From: "John C. Randolph" <email@hidden>
  • Date: Thu, 18 Oct 2001 23:58:01 -0700

On Thursday, October 18, 2001, at 09:31 PM, Isaac Sherman wrote:

I can't seem to remember how to create a pointer to a function in C. I'm
fairly sure it is a C capability... How would I do it with a method in ObjC?

If you want a function pointer to a method's implementation, you can get it with +instanceMethodForSelector:.

Foundation imports a definition for an IMP, which is void (*)(id, SEL,...)).

-jcr




"I fear all we have done is to awaken a sleeping giant and fill him with a terrible resolve." -Admiral Isoroku Yamamoto, Dec 7, 1941.


  • Follow-Ups:
    • NSAppleEventManager problems
      • From: Rosyna <email@hidden>
References: 
 >Pointers to methods (or functions, for that matter) (From: Isaac Sherman <email@hidden>)

  • Prev by Date: private methods?
  • Next by Date: Re: private methods?
  • Previous by thread: Re: Pointers to methods (or functions, for that matter)
  • Next by thread: NSAppleEventManager problems
  • Index(es):
    • Date
    • Thread