Options -from/to and -values behave differently.
Example:
# Initialisation of variables 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
# ......
# 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 (tested 25. February 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 I set the month after the definition
of the spinbox, everything is ok.
The different behaviour of -from/to and -values on the
other hand is at least unexpected and confusing.
Does it mean I should initialize the textvariable
_always_ after the instantiation, because the behaviour
in the -from/to case might change at any time without
notice?
In my eyes this is a bug of spinbox, at least an
inconsistency.
Logged In: YES
user_id=72656
See also 841280.