[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] dynamically creating a callback function
From: |
Krishna |
Subject: |
Re: [Help-smalltalk] dynamically creating a callback function |
Date: |
Wed, 22 Nov 2006 14:45:33 +0530 |
On 11/22/06, Brad Watson <address@hidden> 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.
Cheers,
Krishna
--
I long to accomplish a great and noble task, but it is my chief duty
to accomplish small tasks as if they were great and noble !
- Helen Keller