Re: Bug in spinbox
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: Bug in spinbox

From: Ulrich Schöbel <ulrich@outvert.com>
Date: Sat Feb 25 2006 - 22:33:52 CET

Am Sat, 25 Feb 2006 23:26:02 +0200 schrieb Ulrich Schöbel:

> Hi all,
>
> end of January I started the development of a prototype GUI
> as a starting point for a new program. Part of the GUI is a
> simple date chooser. Everything was fine, the customer was
> happy with it. After having written the innards of this
> program I retested it and, surprise, it didn't work correctly
> anymore: The date chooser came up with the correct day and
> year, but the month was still January.
>
> Here's a short excerpt:
>
> # Initialisation of a couple of variables right at the top
> set months {January February March April May June July August September October November December}
> foreach {day mon year} [clock format [clock seconds] -format "%e %B %Y"]
> break
> #
> # more variables being set
>
> # part of the GUI (date chooser)
> spinbox .f1.f11.dat.day -from 1 -to 31 \
> -width 2 -state readonly -textvariable day
> spinbox .f1.f11.dat.mon -values $months \
> -width 9 -state readonly -textvariable mon
> spinbox .f1.f11.dat.year -from 1980 -to 2036 \
> -width 4 -state readonly -textvariable year
>
> After packing and displaying it, it shows 25. January 2006 as
> the current date. Day and year, configured with from/to work
> correctly, mon configured with -values insists on the first
> value of the list. When Iset the month after the definition
> of th spinbox, everything is ok.
>
> In my eyes this is a bug of spinbox, at least an inconsistency.
>
> Should I file a bug report?
>
> Kind regards
>
> Ulrich

Forgot to say:

Tcl/Tk 8.4.12 on Linux 2.6.12
Received on Sun Apr 30 02:15:52 2006