• 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
address of method in a class instance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address of method in a class instance


  • Subject: address of method in a class instance
  • From: Robert S Goldsmith <email@hidden>
  • Date: Wed, 05 Sep 2001 18:52:44 +0100

Hi :)

This one really has me stuck.

As we have been discussing, CoreFoundation is a bit different from Foundation. As I have the pleasure of using it I am now in the situation where, to get callbacks to work correctly when wrapped in an ObjC class, I need a pointer to a function.

The CF callbacks are based on C and as such ask you to pass a pointer to a function that gets run when the event occurs. This is fine if you only have one instance of a class (you can hack it with bits of C) but I am not happy with that.

What I need is a way to get hold of the address of an ObjC class instance member method. This way I can pass the address and when the callback happens, the correct instance is notified ...

any ideas?

I know it's nasty but unless Foundation has got a replacement for the CF callbacks i can use (and i have asked some of the people concerned directly if I can replace CF with Foundation), I need to do this :(

Robert


  • Follow-Ups:
    • Re: address of method in a class instance
      • From: Peter Ammon <email@hidden>
    • Re: address of method in a class instance
      • From: Fritz Anderson <email@hidden>
    • Re: address of method in a class instance
      • From: Andreas Monitzer <email@hidden>
  • Prev by Date: Re: Any advantages of Unix formatting
  • Next by Date: SimpleImageFilter do not work
  • Previous by thread: Re: what's difference and relationship between CoreFoundation and Fou ndation framework
  • Next by thread: Re: address of method in a class instance
  • Index(es):
    • Date
    • Thread