address of method in a class instance
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