• 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: Passing Obj-C method as callback to C function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Passing Obj-C method as callback to C function (From: email@hidden)

  • Prev by Date: Re: Passing Obj-C method as callback to C function
  • Next by Date: Omni Framework Hell Again
  • Previous by thread: Re: Passing Obj-C method as callback to C function
  • Next by thread: Re: Passing Obj-C method as callback to C function
  • Index(es):
    • Date
    • Thread