Krishna wrote:
On 11/22/06, Brad Watson <[EMAIL PROTECTED]> wrote:
Does anyone have an idea on how a callback function mapped to a class
and selector could be created dynamically ? Lots of libraries that
Ive examined have functions defined within them that require a
callback function as one of the parameters. It would be useful to be
able define the callback function in smalltalk and then pass an
address that maps it's way back to it.. Possible ?
Checkout ffcall and libffi . Both offer the facility to build runtime
trampolines. IIRC, CLISP uses ffcall.
If it is possiblle to pass an arbitrary pointer to the callback, you can
use that to store the selector and receiver. Then you use it to call
back into Smalltalk.
Paolo
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk