Re: Using foreach loop to create radiobutton menu
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Using foreach loop to create radiobutton menu

From: <aj@bookac.com>
Date: Fri Apr 28 2006 - 18:11:21 CEST

Once again, I appreciate the expeditiousness and comprehensiveness of
your last post. That being said, the complaint comes when I load the
script, NOT when I click on the button.

Here is a complete script exemplifying the problem. Run this in your
favorite wish interpreter to see if you get the same error I do.
Hopefully uou have Iwidgets.

I reduced the usage of the "rng" variable to one place, and wrapped it
in quotes as you said to expand it.

package require Iwidgets

set f [frame .main]

iwidgets::menubar $f.menu -menubuttons {
  menubutton range -text "VALUE" -menu {
    foreach rng {1} {
      radiobutton range -label "$rng" -command {puts hello}
    }
  }
}
Received on Sun Apr 30 03:30:46 2006