Re: Building STk on HP-UX
> From: Erick Gallesio <eg_at_kaolin.unice.fr>
> Cc: stk_at_kaolin.unice.fr
> Date: Tue, 14 Feb 1995 11:34:48 GMT
> Subject: Re: Building STk on HP-UX
> This glue code exists and is accessible through the adress-of primitive.
> Your code should be written:
> (let* ((foo 1)
> (bar 2)
> (callback (lambda () (frob foo bar))))
> (button ".frob" :command (address-of callback)))
>
> Note that you have to bind your closure before crating the button to avoid GC
> problems (i.e. Tk-commands capture thir environment, so binding the closure
> to
> "callback" will protect the closure agains GC). This is explained in the
> adress-of primitive documentation I think.
>
> I admit that this is a little bit weird and I hope to remove this constraint
> in a future release.
>
In stklos, could the command information be added to the object, as a
standard slot ?
I imagine that there won't be any gc problems more ??
Maybe the command string stored in the tk object could be a constant
string, refering to a (list-of) thunks stored in the object ??
I hope I'm not too wrong,
f.g.
Received on Tue Feb 14 1995 - 13:41:47 CET
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST