Re: Passing Obj-C method as callback to C function
Re: Passing Obj-C method as callback to C function
- Subject: Re: Passing Obj-C method as callback to C function
- From: Ambroise Confetti <email@hidden>
- Date: Tue, 28 Oct 2003 16:16:09 +0100
Le 28 oct. 03, ` 15:58, email@hidden a icrit :
>
What I currently have is a C function implemented outside the Obj-C
>
class
>
which receives a pointer to the Obj-C object as the context pointer,
>
it uses
>
this pointer to enable access to the object methods for handling the
>
callback.
I think this is the right way to go. Anyway, you need at leats two
addresses for a method call if you use the Objective-C syntax (the
object and the method), and three addresses if you do it the C way
(object, method and selector). Just look at the way IMP pointers are
defined (NSObject documentation)...
Ambroise
http://www.cellulo.info/
ICQ 4508259
AIM atvaark
[demime 0.98b removed an attachment of type text/directory which had a name of Ambroise Confetti.vcf]
_______________________________________________
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.