f



checkbuttons in tcl 8.4.12 and 8.5a4 with -offvalue == ""?

Hello,

I just realized some differences between the checkbuttons visualisation
in tcl 8.4 and 8.5.

If the offvalue of a checkbutton is set to "" (empty string) and the
checkbutton is not "checked", than ...
    - in tcl 8.4.12 the background is white
    - in tcl 8.5a4 the background is grey and the "check" is still
visible

That's a bug, isn't it?

If the offvalue is " " (one blank), than every thing works.

Best regards,

Martin Lemburg
UGS - Transforming the Process of Innovation

0
3/2/2006 2:41:47 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

13 Replies
779 Views

Similar Articles

[PageSpeed] 57

MartinLemburg@UGS wrote:
> Hello,
> 
> I just realized some differences between the checkbuttons visualisation
> in tcl 8.4 and 8.5.
> 
> If the offvalue of a checkbutton is set to "" (empty string) and the
> checkbutton is not "checked", than ...
>     - in tcl 8.4.12 the background is white
>     - in tcl 8.5a4 the background is grey and the "check" is still
> visible
> 
> That's a bug, isn't it?
> 

It's a much sought-after new feature. Checkbuttons in tk 8.5 have the 
ability to have three states: on, off and "tristate".

The default value for the third state is the empty string. It's 
documented in the 8.5 manual page; look for the -tristatevalue option:

http://www.tcl.tk/man/tcl8.5/TkCmd/checkbutton.htm#M17
0
oakley (2075)
3/2/2006 3:10:42 PM
Hhm, ... ok I know now why, but I don't understand why this way of
tristate value usage was chosen!

If I have an offvalue "" and a tristatevalue "", than the tristate
appearance is prefered over the off appearance?

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!

Best regards,

Martin Lemburg
UGS - Transforming the Process of Innovation

0
3/2/2006 3:27:19 PM
MartinLemburg@UGS wrote:
> Hhm, ... ok I know now why, but I don't understand why this way of
> tristate value usage was chosen!

The default values of on-value and off-value are 1 and 0 respectively
(i.e. booleans) so what to use for something that is neither? The empty
string is as good as any (and better than most).

> 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.

> 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? How are
you coping with users clicking on buttons and forcing them away from
those magic values? Right now, you're encouraging me to just tell you
"tough luck". (Radiobuttons are something different here, even though
they are just about identical mechanically.)

Donal.
0
3/2/2006 3:58:56 PM
Hi Donal,

I just reviewed the visual_regexp application from Laurent Riesterer
and I tried to wrap into a starpack.

There I realized the first time, that checkbuttons have now three
states.

In visual_regexp there is the offvalue of some configurational
checkbuttons an empty string, to be used later on in the evaluated
regexp command.

I never touched the tristatevalue, but now I set the tristatevalue to
something else then "", something visual_regexp won't set into the
offvalue.

My thoughts are about the preference the third state takes over the off
state.

For backward compability it would have been nice, to have no need to
care for the tristate value, because if the offvalue and the
tristatevalue are equal, the offvalue appearance would have had the
preference.

So I have to change the behaviour or the configuration of the
checkbuttons unnecessarily. (IHMO)

Best regards,

Martin Lemburg
UGS - Transforming the Process of Innovation

0
3/2/2006 4:40:20 PM
MartinLemburg@UGS <martin.lemburg.ugs@gmx.net> wrote:
> For backward compability it would have been nice, to have no need to
> care for the tristate value, because if the offvalue and the
> tristatevalue are equal, the offvalue appearance would have had the
> preference.

Not only "nice" but even "necessary".
Good luck, tk is still in alpha, so changing
this should principially be possible.

Any application that used an offvalue "" before (which really
isn't all that exotic), would have to be changed (to add a
-tristatevalue "anything"), just to *not* change behaviour.
Of course the new option isn't accepted by older tcl/tk, so
one even needs a check on the tcl/tk version :-(((
If this isn't an "incompatible change", what is?

If on the other hand the tristatevalue was defined to
step behind the on- or off- values, then its ok,
because tristatevalue-nonaware scripts just happily 
continue to work&look-right unchanged.

Btw., additionally, I wonder why the third state displays
as checked (though grayed) when indicatoron is true,
but more like unchecked (raised) when the indicatoron
is false.

I'd prefer a real third state, e.g. a flat relief, or 
some semi-filled indicator (depending on -indicatoron).

No item should appear disabled when in fact it isn't!

0
avl1 (2748)
3/2/2006 5:43:19 PM
"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
0
asnd (4601)
3/2/2006 11:01:57 PM
"MartinLemburg@UGS" <martin.lemburg.ugs@gmx.net> writes:

> I just realized some differences between the checkbuttons visualisation
> in tcl 8.4 and 8.5.

Hmmm...  I don't get any clear picture from the TIP or the TclCore archive 
what need this new -tristate feature is intended to fill.  The TIP's
rationale is jargo-sales-speak:

In order to meet more demanding requirements of todays complex graphical 
user interfaces...to be able to display a third state, i.e., both On and Off.

I don't understand how something is both On and Off, and the explanation
doesn't help me:

This indicates the situation where a property has a particular value 
for some members of a selection set, but not others.


The greatest utility for a third state that I can identify is a visual
representation for the unknown state, when the value matches neither the
On nor Off values.  Unfortunately, the new -tristate does not satisfy
that need, because it uses a particular value.

A third, specific, state for the checkbutton could still be useful for 
some things.  However, I see no utility for a tri-state radiobutton.

-- 
Donald Arseneau                          asnd@triumf.ca
0
asnd (4601)
3/2/2006 11:34:16 PM
"Donald Arseneau" <asnd@triumf.ca> wrote in message
news:yfioe0o775z.fsf@triumf.ca...
> "MartinLemburg@UGS" <martin.lemburg.ugs@gmx.net> writes:
>
> > I just realized some differences between the checkbuttons visualisation
> > in tcl 8.4 and 8.5.
>
> Hmmm...  I don't get any clear picture from the TIP or the TclCore archive
> what need this new -tristate feature is intended to fill.  The TIP's
> rationale is jargo-sales-speak:
>
> In order to meet more demanding requirements of todays complex graphical
> user interfaces...to be able to display a third state, i.e., both On and
Off.
>
> I don't understand how something is both On and Off, and the explanation
> doesn't help me:
>
> This indicates the situation where a property has a particular value
> for some members of a selection set, but not others.
>
>
> The greatest utility for a third state that I can identify is a visual
> representation for the unknown state, when the value matches neither the
> On nor Off values.  Unfortunately, the new -tristate does not satisfy
> that need, because it uses a particular value.
How would you request displaying the "unknown state"? Certainly
not with an unknown value.
>
> A third, specific, state for the checkbutton could still be useful for
> some things.  However, I see no utility for a tri-state radiobutton.

I believe the third state is intended to fill needs such as during
an install component selection process such as.

1) The check represents a bunch of lower level "leaf" options
some of which are on  and some off

2) Check is on but not changeable due to higher level
choices when force it to be checked.

These are somewhat guesses just based on examples of
typical features I've noticed on Windows GUIs.

I expect you will not find them valid and that's OK with
me. But I do believe the TIP implementors had a valid and
positive reasons for the change perhaps not well captured
in the TIP. I expect to eventually make use of the feature.
>
> -- 
> Donald Arseneau                          asnd@triumf.ca


0
royterry (360)
3/2/2006 11:47:33 PM
Donald Arseneau wrote:

> 
> 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?
> 
> 

The second part of the question is easy to answer: it's alpha software. 
That means the code isn't feature complete or fully debugged. 
Fortunately, these sorts of reports are exactly why alphas are released 
-- to see what sort of problems crop up that weren't envisioned by the 
author.

In this instance, the case where the user sets the -on or -off value to 
the same as the default for the -tristate option wasn't properly 
accounted for.

Now, for the first part of the question...

The third value is necessary for a particular set of problems. For 
example, imagine a checklist that lets you turn the display of layers on 
a canvas on and off. For example, it may start out in this state where 
nothing is selected:

    [ ] Cars
        [ ] Convertibles
        [ ] Sedans
        [ ] Coupes
    [ ] Trucks
        ...

If you check the "Cars" box it automatically selects convertibles, 
sedans and coupes.

    [x] Cars
        [x] Convertibles
        [x] Sedans
        [x] Coupes
    [ ] Trucks
        ...

Now, uncheck Sedans. What is the state of "Cars"?

    [?] Cars
        [x] Convertibles
        [ ] Sedans
        [x] Coupes
    [ ] Trucks
        ...

It can't be checked since checked implies everything below is checked. 
It can't be unchecked since that implies everything below is unchecked. 
Hence, the need for a third state.

This sort of thing is somewhat common in installers, for example, where 
you can quickly select a whole package (eg: tcllib) or a subset (eg: 
just SNIT).


0
oakley (2075)
3/3/2006 12:53:54 AM
Hi Donal,

should I file a bug on sourceforge?

Or does this discussion is enough to start an action or to think over
this thing?

Thanks and a happy weekend!

Martin Lemburg
UGS - Transforming the Process of Innvoation

0
3/3/2006 12:04:38 PM
Bryan Oakley <oakley@bardo.clearlight.com> writes:

> Now, uncheck Sedans. What is the state of "Cars"?
> 
>     [?] Cars
>         [x] Convertibles
>         [ ] Sedans
>         [x] Coupes
>     [ ] Trucks

> This sort of thing is somewhat common in installers, for example, where you
> can quickly select a whole package (eg: tcllib) or a subset (eg: just SNIT).

Thanks.  I think the cygwin package selection looked like that, but I don't 
remember if they had special icons for intermediate/tristate/... selections.

I think there are several possible variations on "neither here nor there"
and it would indeed be useful to have a representation when one crops up.


-- 
Donald Arseneau                          asnd@triumf.ca
0
asnd (4601)
3/4/2006 7:32:09 AM
"Roy Terry" <royterry@earthlink.net> writes:

> "Donald Arseneau" <asnd@triumf.ca> wrote in message
> > The greatest utility for a third state that I can identify is a visual
> > representation for the unknown state, when the value matches neither the
> > On nor Off values.  Unfortunately, the new -tristate does not satisfy
> > that need, because it uses a particular value.
> How would you request displaying the "unknown state"? Certainly
> not with an unknown value.

Certainly yes!  Until now, the checkbutton is displayed with its "off"
appearance for any value except the onvalue.  This is documented:

  "automatically selects and deselects itself when the 
   variables value changes to and from the button's 
   ``on'' value."

As such, the offvalue has no relevance for the visual display.  
But it would often be useful to distinguish between the selected
offvalue and all other bogus values.

> > A third, specific, state for the checkbutton could still be useful for
> > some things.  However, I see no utility for a tri-state radiobutton.
> 
> I believe the third state is intended to fill needs such as during
> an install component selection process such as.[...]
> 
> I expect you will not find them valid and that's OK with me. 

It sounds good to me too, although I am still at a loss for
a radiobutton application.


-- 
Donald Arseneau                          asnd@triumf.ca
0
asnd (4601)
3/4/2006 7:48:35 AM
Donald Arseneau wrote:
> "MartinLemburg@UGS" <martin.lemburg.ugs@gmx.net> writes:
>
> > I just realized some differences between the checkbuttons visualisation
> > in tcl 8.4 and 8.5.
>
> Hmmm...  I don't get any clear picture from the TIP or the TclCore archive
> what need this new -tristate feature is intended to fill.  The TIP's
> rationale is jargo-sales-speak:
>
> In order to meet more demanding requirements of todays complex graphical
> user interfaces...to be able to display a third state, i.e., both On and Off.
>
> I don't understand how something is both On and Off, and the explanation
> doesn't help me:
>
> This indicates the situation where a property has a particular value
> for some members of a selection set, but not others.
>
>
> The greatest utility for a third state that I can identify is a visual
> representation for the unknown state, when the value matches neither the
> On nor Off values.  Unfortunately, the new -tristate does not satisfy
> that need, because it uses a particular value.
>
> A third, specific, state for the checkbutton could still be useful for
> some things.  However, I see no utility for a tri-state radiobutton.
>
> --
> Donald Arseneau                          asnd@triumf.ca


If I didn't know better, I would swear that you've never used a
computer before!

I'll give you an example of tri-state check button outside of Tk.  You
can do this regardless of which OS you're using; it's valid on Mac OS
X, KDE, and XP:

    Open a file explorer
       (XP: explorer, OS X: finder, KDE: konqueror).
    Select a single file and using the RMB popup menu,
        select "Properties".
        (OS X, it's "Get Info" from the File pulldown if you
          don't have a 3-button mouse)
    Somewhere in the properties dialog box you'll find check
       button(s) that represent some permission state of the
       file (read-only, execute, etc.).

    Now, select a different file and repeat.  Same thing.
    Now make a change so that you have two files with different,
       say, read-only settings: one is read-only, and the other is not.
    Next, select both files (Yes, multiple selection).
    Open the properties dialog.

The dialog box on a multiple selection will display the property state
of all the selected items with a single checkbutton.  If they are all
checked, it shows checked. If they are all unchecked, it shows
unchecked.  If, however, some are checked and some aren't, the button
shows Tri-State.  But here's the most important part:  clicking on the
checkbutton will change the state of ALL items.  This is a feature!

The general idea is that the checkbutton represents the state of an
object.  The object comes from a set of objects.  For convenience and
power, multiple selection is also represent with the single button.
The "power" part comes from the ability to act on the multiple
selection using the single button.

This is why the checkbutton was changed. It's not difficult to see how
the radiobutton can apply to multiple selection as well.

I will concede that the choice of "" as the default tristate value is
probably not ideal and it's not too late to change this.  You can also
easily work around this with:

    option add *Checkbutton.tristateValue "NONE"

So you don't have to edit each instance of the checkbutton.

0
briang42 (16)
3/8/2006 5:09:50 PM
Reply:

Similar Artilces:

"::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4" caused by replacing Tcl 8.4.1 with 8.5.7
In the blog http://planet.larrythecow.org/archives/2009-07-26.html "The Twouble with Tcl" Iain Buchanan shows that redefining OPEN proc leads to the errors similar to what I am getting - when I replaced Tcl 8.4.1 with Tcl 8.5.7. In my case I don't know the exact root cause though ... Any ideas how I should proceed with debugging this issue ? Thanks, Alex tclsh c:/Tornado/host/resource/hutils/tcl/makeSymTbl.tcl ppc tmp.o symTbl.c invalid command name "::tcl::tm::UnknownHandler" while executing "::tcl::tm::UnknownHandler ::tclPkgUnknown msg...

[ info exists varName ] returns "" on Tcl 8.4.4 ... we're losing our sanity here
Hello, We're using "Tcl 8.4.4.0 Solaris/SPARC" .... pretty darned old version, I know ... but we have no choice as our program doesn't work well with newer versions. Anyway, we keep getting an error that we all used to think was simply impossible ... namely [ info exists ] not returning zero or non-zero but simply returning an empty string: can't use empty string as operand of "!" while executing "if { ! [ info exists ::varName ] } { return }" (procedure "debugOut" line 3) invoked from within "debugOut -g 9 "Entered function."" (procedure "programExit" line 3) invoked from within "programExit 0" How the heck is this even possible?? Is this a bug in Tcl? I don't see how anything we could do could ever cause [ info exists ] to return an empty string! Regards, Markus On Jun 22, 5:51=A0pm, antred <Nut...@gmx.net> wrote: > Hello, > > We're using "Tcl 8.4.4.0 Solaris/SPARC" .... pretty darned old > version, I know ... but we have no choice as our program doesn't work > well with newer versions. > > Anyway, we keep getting an error that we all used to think was simply > impossible ... namely [ info exists ] not returning zero or non-zero > but simply returning an empty string: > > can't use empty string as operand of "!" > =A0 =A0 while executing > "if { ! [ info exists ::var...

"string map" Probleme in tcl 8.4 mit Umlauten?
Seit Jahren setze ich TCL als integrierte Skript-Sprache in einer Softwarel=F6sung ein (Microsoft Windows, MFC-Anwendung). Vor kurzem bin ich von TCL 8.3.5 auf TCL 8.4.14 umgestiegen. Mit dieser Version bekommen wir aber Probleme, da sich das Verhalten des Kommandos "string map" ge=E4ndert hat. Beispiel: set a "=E4=F6=FC" set x [string map {. ,} $a] x enth=E4lt dann "=C3=A4=C3=B6=C3=BC". Der String wird dabei offensichtlich= in Unicode umgewandelt, wo TCL 8.3 den String noch unver=E4ndert lie=DF. In der Shell (tclsh84.exe) wird die Umsetzung aber noch genauso wie unter TCL 8.3 vorgenommen, also unver=E4ndert gelassen. Die Initialisierung in der MFC-Anwendung ist vergleichbar zu der der TCL-Shell: Tcl_SetDefaultEncodingDir( ... ); Tcl_FindExecutable( ... ); interp =3D Tcl_CreateInterp(); Auch das Einf=FCgen der Zeile setlocale(LC_ALL, "C"); wie sie von der main() Funktion der TCL-Shell verwendet wird, l=F6st das Problem nicht. Es besteht zwar die M=F6glichkeit, die TCL-Skripte wie folgt anzupassen: set a "=E4=F6=FC" set x [encoding convertfrom identity [string map {. ,} $a]] ..=2E. aber erstens m=FCsste ich dann sehr sehr viele Skripte anpassen und zweitens habe ich Sorge, dass auch andere String-Funktionen unbemerkt solche Unicode-Umwandlungen vornehmen. Es w=E4re mir also wichtig, den Interpreter dazu zu bringen, sich genauso zu verhalten, wie die TCL- Shell. Innerhalb von Tcl sin...

missing "lappend" from tcl 8.4.2.0 help .chm
I just noticed this tonight when I went to cross reference the windows help on lappend ,with the Brent Welch's 4th edition text.I'm sure this was fixed in newer releases. Love the book ,it's lighter with thinner pages ,the 3rd ed got me started ,now the 4th ed is THE tcl book ! keep em coming Brent ,nice to see Jeff Hobbs credited on this one too ,thanks. NeuroS wrote on 06/08/03: > err if you do a search you will find it , > 'Built-In Commands - lappend manual page. > just not listed in with other list cmds. That is very confusing. lappend should be listed ...

Tcl 8.5a4 freezing on "expr 1.234" on AMD Opteron
If I compile EITHER the 32- or 64-bit Tcl8.5a4 on my Redhat Enterprise Linux AMD Opteron box I encounter an infinite loop inside TclDoubleDigits()'s call to mp_div(). The simple command "expr 1.234" will trigger the behavior, while lower precision numbers won't. Here's the loop that's failing to terminate: do { q.dp[i - t - 1] = (q.dp[i - t - 1] - 1) & MP_MASK; /* find left hand */ mp_zero (&t1); t1.dp[0] = (t - 1 < 0) ? 0 : y.dp[t - 1]; t1.dp[1] = y.dp[t]; t1.used = 2; if ((res = mp_mul_d (&t1, q.dp[i - t - 1], &t1)) != MP_OKAY) { goto LBL_Y; } /* find right hand */ t2.dp[0] = (i - 2 < 0) ? 0 : x.dp[i - 2]; t2.dp[1] = (i - 1 < 0) ? 0 : x.dp[i - 1]; t2.dp[2] = x.dp[i]; t2.used = 3; } while (mp_cmp_mag(&t1, &t2) == MP_GT); Has anyone else encountered this problem, or can anyone offer suggestions as to how I might proceed? On Tue, 16 May 2006 22:02:50 +0200, Tim Edwards <Tim.J.Edwards@gmail.com> wrote: > If I compile EITHER the 32- or 64-bit Tcl8.5a4 on my Redhat Enterprise > Linux AMD Opteron box I encounter an infinite loop inside > TclDoubleDigits()'s call to mp_div(). The simple command "expr 1.234" > will trigger the behavior, while lower precision numbers won't. Strange, but: $ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 mode...

What's wrong with "fconfigure stdout -encoding utf-8" on windows in Tcl 8.5.10
With my built 8.5.10 I tried to issue command "fconfigure stdout - encoding utf-8" to tclsh on WinXP, the tcl prompt then was shown as two dots instead of percentage sign, C:\>tclsh85t.exe % fconfigure stdout -encoding utf-8 =E2=80=A5date The current date is: 11/29/2011 Tue Enter the new date: (mm-dd-yy) time The system cannot accept the date entered. Enter the new date: (mm-dd-yy) =E2=80=A5 =E2=80=A5 So wonder what's wrong with fconfigure on stdout? Is that the issue? On Nov 29, 7:46=C2=A0am, "wrena...@gmail.com" <wrena...@gmail.com> wrote: > With my built 8.5.10 I tried to issue command "fconfigure stdout - > encoding utf-8" to tclsh on WinXP, the tcl prompt then was shown as > two dots instead of percentage sign, > > C:\>tclsh85t.exe > % fconfigure stdout -encoding utf-8 > =E2=80=A5date > The current date is: 11/29/2011 Tue > Enter the new date: (mm-dd-yy) time > The system cannot accept the date entered. > Enter the new date: (mm-dd-yy) > =E2=80=A5 > =E2=80=A5 > > So wonder what's wrong with fconfigure on stdout? Is that the issue? Short answer: Yes. Longer answer: The encoding in Windows is not UTF-8 but one of cp.... flavors. Question: what did you expect that to do? Mark On 29/11/2011 06:59, Mark Janssen wrote: > Short answer: Yes. > Longer answer: The encoding in Windows is not UTF-8 but one of cp.... > flavors. Also, the code that writes to the (genuine) ...

winter and summer time confusion in clock and tcl 8.4.12 and 8.5a4 (starpack)
Hello, I just realized, that there is one 1 hour difference between the "old" clock from tcl 8.4.12 and the "new" clock from tcl 8.5a4 (starpack). I only used "clock format [clock scan now]" and the result in tcl 8.4.12 was right. The result in tcl 8.5a4 (starpack) is one hour before the current time. I think it could be something about winter and summer time, because last weekend (26/27.3.2006) we switched one hour forward to the summer time. Should I file a bug? Best regards, Martin Lemburg UGS - Transforming the Process of Innovation MartinLemburg@UGS wrote: > Hello, > > I just realized, that there is one 1 hour difference between the "old" > clock from tcl 8.4.12 and the "new" clock from tcl 8.5a4 (starpack). > > I only used "clock format [clock scan now]" and the result in tcl > 8.4.12 was right. The result in tcl 8.5a4 (starpack) is one hour before > the current time. > > I think it could be something about winter and summer time, because > last weekend (26/27.3.2006) we switched one hour forward to the summer > time. > > Should I file a bug? This seems to be documented in the Tcl 8.5 clock scan manpage: (near the end of the manpage) Daylight savings time correction is applied only when the relative time is specified in units of days or more As now is a relative time and not in units of days or more, no correction is done. Michael Hello Michael, sad, t...

ANN: Tcl-Tk-Aqua 8.4.14 "universal" installer for OS X
The Tcl/Tk "Universal" packages are distributions of the core Tcl/Tk libraries, plus the Tile theming extension, built to support the PPC and Intel architectures of the Mac OS X platforms. They can be downlaoded at http://tk-components.sourceforge.net/installer/index.html. OVERVIEW OF PACKAGES The Tcl/Tk "Universal" package for Mac OS X are based on the current version of Tcl/Tk at the time of this build, 8.4.14. The Tile extension is version 0.7.8. The packages support the native Aqua version. Aqua The "Aqua" package supports the native Mac windowing environment. It is useful for developing and deploying native Mac OS X applications. With the "Aqua" package, the following will be installed on your machine: *The Tcl and Tk frameworks will be installed in /Library/Frameworks. * The Tcl interpreter, tclsh, and the Tk interpreter, wish, will be installed in /usr/local/bin. *The Tile extension, which adds native Aqua theming to the Tk widgets, will be installed in /Library/Tcl. * The Wish application package will be installed in /Applications/Utilities. A standalone version of Wish, with the Tcl/Tk and Tile libraries embedded in the application package, will be installed in /Applications/Utilities/Wish-Embedded. This package is useful for deploying Tcl/Tk applications to end users.The Tcl/Tk "Universal" packages are distributions of the core Tcl/Tk libraries, plus the Tile theming extension, built to support...

Tcl 8.4 regexp bug ("can't happen -- you found a bug")
Howdy, The following regsub command causes the above error message in Tcl 8.4: regsub {(^|\n)+\.*b} \n.b "" tmp There's probably room for argument about whether the expression is malformed. But in that case, it should probably say "quantifier operand invalid" rather than "you found a bug". Good luck, -Jonathan Jones According to Jonathan Jones <googlegroups@spitzensparken.com>: :The following regsub command causes the above error message Stop by the SourceForge project and submit a bug report on it. -- <URL: http://wiki.tcl.tk/ > In Go...

"pipe" in Tcl 8.5ff
Hi, I am looking for a replacement of the "pipe" command of tclx. This command creates a FIFO and returns one fd for reading and one for writing. A similar command in C is #include <unistd.h> int pipe(int pipefd[2]); How do I do that with plain Tcl (version >= 8.5)? Best regards Ole Στις 8/8/2013 2:38 μμ, ο/η Olе Streicher έγραψε: > Hi, > > I am looking for a replacement of the "pipe" command of tclx. This > command creates a FIFO and returns one fd for reading and one for > writing. A similar command in C is > > #include <unistd.h> > int pipe(int pipefd[2]); > > How do I do that with plain Tcl (version >= 8.5)? > > Best regards > > Ole > In tcl 8.6, with the "chan pipe" command. In tcl 8.5, with the tclpipe extension: http://wiki.tcl.tk/21637 If you need this for executing commands, see the man page for "open" and possibly "exec". George Hi George, George Petasis <petasisg@yahoo.gr> writes: > Στις 8/8/2013 2:38 μμ, ο/η Olе Streicher έγραψε: >> I am looking for a replacement of the "pipe" command of tclx. > In tcl 8.6, with the "chan pipe" command. In tcl 8.5, with the tclpipe > extension: > > http://wiki.tcl.tk/21637 Is there a way to do it in plain tcl, without the need to compile an external package? > If you need this for executing commands, ...

What is "error 8"
I set up an external serial modem using the Red Hat GUI networking tool as a generic modem device. However, when I hit the "Activate" button, I get the message, "Failed to activate device with error 8." Where can I find what "error 8" means? Thanks. No one responded, but for the benefit of any other newbies who encounter this problem, here is the solution: I looked in the System Log and saw that the modem did not find a dial tone. I plugged in a phone line, and the "Activate" command worked fine. (I had not realized that "Activate" meant "Connect.") Crooked River wrote: > I set up an external serial modem using the Red Hat GUI networking tool > as a generic modem device. However, when I hit the "Activate" button, > I get the message, "Failed to activate device with error 8." Where can > I find what "error 8" means? > System error numbers can be found in /usr/include/asm/errno.h The only problem is that there is no assurance that that is what the program is displaying. #define ENOEXEC 8 /* Exec format error */ does not sound like what you are really getting. The best bet would be to look at the source of the program that is producing that error message. Unfortunately, the scattered shell scripts, programs, and whatnot concerned with networking, especially dial-up networking is a spaghetti mess, and if your ...

How to reject "blank" entry for the From Address with sendmail 8.12.8?
Is there a way to reject a "blank" from to address using the access lists with sendmail 8.12.8 or in the sendmail.cf config file directly? Looks like I getting 100+ connections an hour right now from this spammer from different IPs addresses... Jun 25 11:38:39 mail sendmail[4827]: h5PGcdE1004827: from=<>, size=3128, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=omr-m03.mx.aol.com [64.12.138.3] Thanks in Advance, Brian brian wrote: > Is there a way to reject a "blank" from to address using the access lists > with sendmail 8.12.8 or in the sendmail.cf ...

Bug789040 came back in Tcl 8.4.6 and Tcl 8.5.
Dear All, Bug 789040 caused exec error in Windows 9x and was fixed in 10/04/03. But it came back in Tcl 8.4.6 and Tcl 8.5. Tcl Windows 9x users should be alerted to the possible failure of exec in the current Tcl 8.4.6 and 8.5 releases due to this bug. Chengye Mao http://www.geocities.com/~chengye Chengye Mao wrote: > Bug 789040 caused exec error in Windows 9x and was fixed in 10/04/03. > But it came back in Tcl 8.4.6 and Tcl 8.5. Tcl Windows 9x users > should be alerted to the possible failure of exec in the current Tcl > 8.4.6 and 8.5 releases due to this bug. Have you i...

TCL is not thread safer in TCL 8.3 or 8.4... Any plans to fix this?
It is a shame that I can't upgrade one of my applications due to this problem, though the memory leaks also intorduced in 8.3 and 8.4 are problem as well. :( I have a process that spawn a configurable number of thread with a TCL intrepeter in each one. The interps are isolated and do not communicate or share anything withe each other. Each thread is a rule processor that is handed TCL scripts based on what events occurs within a multi process enviroment rnaing across the whole itnerprize... Works great with TCL 8.2, not a single problem... But with TCL 8.3 and TCL 8.4 we get quite a few run time errors and/or data corruption and core dumps that all leads back to TCL. :( Quite a shame! cwhooks@landacorp.com wrote: > It is a shame that I can't upgrade one of my applications due to this > problem, though the memory leaks also intorduced in 8.3 and 8.4 are > problem as well. :( What are the bug report ID numbers of the issues giving you trouble? -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________| Don Porter <dgp@email.nist.gov> wrote: > cwhooks@landacorp.com wrote: >> It is a shame that I can't upgrade one of my applications due to this >> problem, though the memory leaks also intorduced ...

Error with "package require" in Tcl 8.5a1
Hello All, I downloaded the latest sources for Tcl, thread, Tk, and Tile.... After compiling each, running tests, then installing.... whenever I do a package require I get a bunch of errors. See below: D:\>tclsh85t % package require Tk 8.5 error reading package index file D:/Tcl/lib/dde1.2/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file D:/Tcl/lib/dde1.3/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file D:/Tcl/lib/expect/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file D:/Tcl/lib/reg1.1/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file D:/Tcl/lib/Tcldom2.6/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file D:/Tcl/lib/tcllib1.6/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file D:/Tcl/lib/Tclxml2.6/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file D:/Tcl/lib/tile0.4/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file D:/Tcl/lib/tk8.4/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file D:/Tcl/lib/tklib0.2/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file D:/Tcl/lib/vfs1.3/pkgIndex.tcl: too many nested evaluations (infinite loop?) error reading package index file D:...

XPS 8.2 "UPDATE Tcl procedures"?
Hi, all. Can anyone tell me what "Running UPDATE Tcl procedures for OPTION PLATGEN_SYSLEVEL_UPDATE_PROC..." means, and what platgen actually does to the .tcl files? I'm wondering if this could be the cause of an issue I'm having with BRAM instances. Before, I could run a Base System with 1 or more MicroBlazes with any available size Local Memory each, and no other extra peripherals or software (merely for testing purposes), and it would build the bitstream just fine. Now, XPS generates this error with the same Base System straight from the Wizard (ML310 board v2p30ff896-6, ...

tk 8.5 vs 8.4: "font actual" differences
Could someone tell why on the very same system "font actual" gives different results in 8.5 and 8.4: % info patchlevel 8.4.14 % font actual {Helvetica 8} -family helvetica -size 8 -weight normal -slant roman -underline 0 -overstrike 0 % info patchlevel 8.5.1 % font actual {Helvetica 8} -family {Nimbus Sans L} -size 8 -weight normal -slant roman -underline 0 -overstrike 0 What is the magic behind using {Nimbus Sans L} in 8.5? This makes a difference when generating Postscript output, where suddenly instead of 'Helvetica' 'Nimbus Sans L' is requested. The result is that my printer (HP LaserJet with PostScript engine) substitutes a fixed width font instead of Helvetica :-/ % canvas .c .c % pack .c % .c create text 10 10 -font {Helvetica 8} -text foo 1 % .c postscript -file foo.ps % lp foo.ps => prints with Helvetica in 8.4 => prints with Courier (?) in 8.5 Thanks R' Hi Ralf, I think its simply about font mapping! As example ... I have no font named "Helvetica" on my machine, so ... (bin) 1 % font actual {Helvetica 8} -family Arial -size 8 -weight normal -slant roman -underline 0 - overstrike 0 .... returns "Arial". I don't know where the mapping occurs, but the tcl 8.5 font man page does not tell something about font name mapping - perhabs I overread it. Is it possible to tell in Postscript to download a font, not present on the printer to get used? Or is the pri...

FAQ 1.12 What's the difference between "perl" and "Perl"? #8
This is an excerpt from the latest version perlfaq1.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 1.12: What's the difference between "perl" and "Perl"? One bit. Oh, you weren't talking ASCII? :-) Larry now uses "Perl" to signify the language proper and "perl" the ...

problem with "file executable" on windows, tcl 8.5.2
ActiveState TCL 8.5.2, Windows XP SP2 'file executable' always returns 0, even on .exe and .bat when asked for a file on a network share: % info patchlevel 8.5.2 % set file L:/ralf/si++aegis/si++.4.0.C443/bin/winnt/gen.exe L:/ralf/si++aegis/si++.4.0.C443/bin/winnt/gen.exe % file exists $file 1 % file readable $file 1 % file executable $file 0 % file executable {L:/ralf/si++aegis/si++.4.0.C443/bin/winnt/simenu.bat} 0 However, when copying the files to local disk, the files are qualified as executable: % cp L:/ralf/si++aegis/si++.4.0.C443/bin/winnt/simenu.bat d:/temp % file executable d:/temp/simenu.bat 1 % cp L:/ralf/si++aegis/si++.4.0.C443/bin/winnt/gen.exe d:/temp % file executable d:/temp/gen.exe 1 Also: % set argv0 D:/Programme/tcl/bin/tclsh85.exe % file executable $argv0 1 The L:/ Network Share is an Samba share mounted from a linux box. Are there any special requirements for the smb options? Thanks R' Ralf Fassel said on 24/04/2008 21:21: > ActiveState TCL 8.5.2, Windows XP SP2 > > 'file executable' always returns 0, even on .exe and .bat when asked > for a file on a network share: > The L:/ Network Share is an Samba share mounted from a linux box. I have opened a similar report some time ago for file readable on a Samba share. Still open. See: http://sourceforge.net/tracker/index.php?func=detail&aid=1613456&group_id=10894&...

is the value of "clock scan today" correct (tcl 8.6)
Hi, I was surprised that the clock value of "now" and "today" are equal: % expr {[clock scan now] == [clock scan today]} 1 I expected the "today"s value to be: % clock format [clock scan today] Mon Jan 21 18:52:47 CET 2013 % clock format [clock scan {last day + 24 hours}] Mon Jan 21 00:00:00 CET 2013 Why behaves the clock value "today" this way? Is it a bug or intention? Best regards, Martin BTW: where is the word "this" for free form times/dates valid? At 2013-01-21 12:53PM, "MartinLemburg@Siemens-PLM" wrote: > BTW: where is the word "this" for free form times/dates valid? Probably a bug. I imagine it is supposed to be used like the relative modifiers "next" and "last": % clock format [clock scan "12:01 monday"] Mon Jan 28 12:01:00 EST 2013 % clock format [clock scan "12:01 next monday"] Mon Feb 04 12:01:00 EST 2013 % clock format [clock scan "12:01 last monday"] Mon Jan 21 12:01:00 EST 2013 % clock format [clock scan "12:01 this monday"] unable to convert date-time string "12:01 this monday": syntax error (characters 5-9) -- Glenn Jackman Write a wise saying and your name will live forever. -- Anonymous Yes, it seems so! The "today" keyword seems to be for relative time movements, too: % clock format [clock scan {0:00:00 today}]...

TCL 8.5.6 invalid command name "clock"
Hello, I running a c++ application with an Tcl 8.5.5. interpreter. Now I try to update TCL to version 8.5.6. While running the application with TCL 8.5.6 I get the following error: invalid command name "clock" while executing "clock seconds" Is there something I might have overseen, or is this a bug in version 8.5.6. Thank you for help in advance. Kind Regards sindbad0815@googlemail.com wrote: > I running a c++ application with an Tcl 8.5.5. interpreter. Now I try > to > update TCL to version 8.5.6. While running the application with TCL > 8.5.6 I get the following error: > > invalid command name "clock" > while executing > "clock seconds" > > Is there something I might have overseen, or is this a bug in version > 8.5.6. Within that program, what value is returned from the Tcl_Init() call? -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________| On 16 Mrz., 16:38, Don Porter <d...@nist.gov> wrote: > sindbad0...@googlemail.com wrote: > > I running a c++ application with an Tcl 8.5.5. interpreter. Now I try > > to > > update TCL to version 8.5.6. While running the application =A0with TCL > > 8.5.6 I get the following e...

Strange difference between Tcl/Tk 8.4.12 and 8.5.0
Hi, there is a difference between etcl.exe Tcl/Tk 8.4.12 activestate tcl 8.5.0.0-beta-5 on the calc.tcl demo that comes with the etcl download. In 8.5: sqrt(2) --> 213562 ... (No problems with numbers that have non-negative integer square roots) 8.4 was fine. This is obviously not a problem with 8.5. Rather there is some difference between the parsers that is resulting in different arguments being sent to the sqrt function. Perhaps someone more knowledgeable can look at the calc.tcl demo. Regards bobsteel a �crit : > Hi, there is a difference between > > etcl.exe Tcl/Tk 8.4.12 > activestate tcl 8.5.0.0-beta-5 > > on the calc.tcl demo that comes with the etcl download. > > In 8.5: sqrt(2) --> 213562 ... > (No problems with numbers that have non-negative integer square roots) > 8.4 was fine. > > This is obviously not a problem with 8.5. Rather there is some > difference between the parsers that is resulting in different arguments > being sent to the sqrt function. Perhaps someone more knowledgeable can > look at the calc.tcl demo. > Reason is much simpler. It's because with 8.5, tcl_precision default to 0 (i.e. maximal precision) while it defaults to 12 with 8.4.x (eTcl or any other distrib). This calc.tcl demo in eTcl distrib is pretty simple (not to say trivial), and implicitely use this for number formatting, instead of explictely calling [format ...] to format displayed result. This can of course b...

http::geturl returns "data error" with tcl 8.6
I have troubles using the http::geturl with RIPE's REST API. With TCL 8.5 it works: % puts $tcl_version 8.5 % package require http 2.7.5 % http::geturl http://www.hp.com/index.html ::http::1 % http::geturl http://rest.db.ripe.net/search ::http::2 % With 8.6 it doesn't: % puts $tcl_version 8.6 % package require http 2.8.7 % http::geturl http://www.hp.com/index.html ::http::1 % http::geturl http://rest.db.ripe.net/search data error % Why am I getting this "data error" back ? What specific Tcl 8.6 version ([info patchlevel]) ? 8.6.2 had some ...

difference between tcl 8.4.2 & 8.4.4
% exec $env(COMSPEC) /c net config This command now fails on Tcl 8.4.4 What can I do instead? to run with either version of tcl and windows 98. "couldn't execute "C:\WINDOWS\COMMAND.COM": no such file or directory" Running on Win 98. Win XP is ok. Peter Campbell wrote: > % exec $env(COMSPEC) /c net config > > This command now fails on Tcl 8.4.4 > What can I do instead? to run with either version of tcl and windows 98. > > "couldn't execute "C:\WINDOWS\COMMAND.COM": no such file or directory" > > Running on Win 98...

"booster-label"
Hallo, noticed a strange - but very interesting thing. Take a look at the following script: ================== cut ============= #! /bin/sh # the next line restarts using wish \ exec wish "$0" "$@" #label .foo for {set ii 0} {$ii < 20} {incr ii} { label .label$ii -text "label #$ii" -font "Helvetica 10" pack .label$ii puts $ii } ================== cut ============= There is noticeable difference in filling the output window (look at the puts counter speed), when you either uncomment the #label .foo line - or delete the `-font "Helvetica 10" ' parameter from label definition. What do you think? Why using font option in label definition makes it so slow - and even so: why adding senseless looking line fixes the whole thing? It doesn't have to be a label; you can replace it with f.e. "scale .foo" definition - the result is the same. The presence of such line makes building of the output window over 10x faster, like there weren't font option added. -- ZB Dnia 27.08.2007 Bryan Oakley <oakley@bardo.clearlight.com> napisa�/a: >> There is noticeable difference in filling the output window (look at the >> puts counter speed), when you either uncomment the #label .foo line - or >> delete the `-font "Helvetica 10" ' parameter from label definition. > > Do you have really slow hardware? It's Pentium III 550. > Or maybe you're running a *nix ver...

Web resources about - checkbuttons in tcl 8.4.12 and 8.5a4 with -offvalue == ""? - comp.lang.tcl

Resources last updated: 3/13/2016 4:21:22 PM