Re: menu entries and scheme variables

From: Erick Gallesio <eg_at_kaolin.unice.fr>
Date: Mon, 21 Aug 1995 15:57:55 +0100

> Erik Ostrom writes
> Tk allows menu entries to be tied to variables--so you can do
>
> {.mymenu add checkbutton :label on :variable mymenuIsOn}
>
> and then setting the variable `mymenuIsOn' changes the checkbutton's state,
> and clicking on the checkbutton sets the variable.
>
> We can do this in STk(los), but as far as I can tell,
>
> * the variable has to have a global name, so you can pass it in
> by name.
> * the variable will be set to "0" or "1", not #f or #t.
>
> I assume this is just part of the whole problem of passing non-strings to Tk,
> and I don't mean to complain. I just wanted to check with the list: Am I
> missing a way to pass in non-global variables? (I tried using address-of in
> various ways, and they didn't seem to work.) Alternatively, has anybody
> written code to make this interface cleaner?

You'll have a correct boolean value in 3.0.
For the variable, I have not yet implemented a way to use a non global
variable. I hope to be able to do something for the first alpha relase of 3.0
but I will not promise it.








                -- Erick
Received on Mon Aug 21 1995 - 15:57:56 CEST

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