Re: Using closures as commands/button callbacks...

From: Andrew Dorrell <>
Date: Sat, 10 Jun 95 11:56:14 EST

> But when I started messing around with STk, I found that the actions
> were quoted, like in emacs-lisp, which I think is wrong.
> In the STk-inspired Tk binding of GNU's interpreter, Guile, you can
> pass an anonymous Scheme procedure in the callback position of a
> widget configuration call, "bind" call, or "after" call.

        This is an interesting debate and both sides have merits I believe.
Yes, having to pass bindings as strings to Tk is a problem and one which has
been partly addressed in STk by the (perhaps messy) introduction of the
"address-of" command (see STk reference manual page 32).

One thing that STk definately has going for it that I haven't seen in any
other interface to Tk is some really nice object wrappers (the los extensions).
These potentially allow callbacks to be methods rather than functions - and
that, to me, seems powerful. In addition these extensions allow consistent
access to Tk variables as scheme data types.
> This is made possible by a small modification to libtk called
> "canonical commands". Canonical commands are described in

        Read this - STk really needs a page like this one.... the size of
the user group probably should be a lot bigger (and would be if there was
more knowledge of it I believe).

Mr Andrew Dorrell
School of Electrical Engineering                 *
University of Technology, Sydney                     *
PO Box 123                                     *
Broadway NSW 2007                                   .  
                                                    *       /---\  Whoo?
Phone:   61 2 330 2395                                      (o o) /
Fax:     61 2 330 2435                                      ( : )  
email:                               ^ ^     
Received on Sat Jun 10 1995 - 03:57:44 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST