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

From: Andrew Dorrell <andrewd_at_ee.uts.edu.au>
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
> http://www.cygnus.com/library/ctr/guile.html.
>

        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).


Regards,
-- 
------------------------------------------------------------------------------
Mr Andrew Dorrell
School of Electrical Engineering                 *
University of Technology, Sydney                     *
PO Box 123                                     *
Broadway NSW 2007                                   .  
AUSTRALIA
                                                    *       /---\  Whoo?
Phone:   61 2 330 2395                                      (o o) /
Fax:     61 2 330 2435                                      ( : )  
email:   andrewd_at_ee.uts.edu.au                               ^ ^     
    OR   dorrell_at_ihf.uts.edu.au
------------------------------------------------------------------------------
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