Re: checkbuttons in tcl 8.4.12 and 8.5a4 with -offvalue == ""?
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: checkbuttons in tcl 8.4.12 and 8.5a4 with -offvalue == ""?

From: Donald Arseneau <asnd@triumf.ca>
Date: Fri Mar 03 2006 - 00:01:57 CET

"Donal K. Fellows" <donal.k.fellows@manchester.ac.uk> writes:

> MartinLemburg@UGS wrote:
> > If I have an offvalue "" and a tristatevalue "", than the tristate
> > appearance is prefered over the off appearance?
>
> Looks like pilot error to me. :-) Don't set two of the values to the
> same thing, or you cease to be in the domain of behaviour that we specify.

Looks like language designer error to me! Martin did NOT set two values
but inherited the default "" value for the sneaky new tristate option.

Unspecified domains are almost always a mistake of the language design.

It is probably time to define an order of preference in the case of
identical values, also defining the state implied by no match. I
suggest on,off,tristate,off as the order of preference.

> > So I always have to set the tristatevalue to someting "impossible", if
> > the value of a checkbutton could be variable, even "", or if one of the
> > state values is ""?
> > Sounds for me a bit awkward!
>
> But it's a checkbutton! In all classical use its value will be
> consistently one of two things, the on- or the off-value. What on earth
> are you doing that is setting a checkbutton's variable to more than two
> values without the third one being some kind of tristate value?

Why on earth was a third value added to the widget design? Why on earth
was that new feature allowed to interfere with normal on-or-off function?

-- 
Donald Arseneau                          asnd@triumf.ca
Received on Sun Apr 30 02:21:37 2006