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
Received on Sun Apr 30 02:15:50 2006