Re: Pointers to methods (or functions, for that matter)
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.