Recent Articles from comp.lang.tcl

ANNOUNCE: cffi 2.0b1 released
Posted by Ashok <apnmbx-public@yahoo.com> 4 hours 16 minutes ago
Last contribution 4 hours 16 minutes ago 0
The Tcl cffi package permits calling C functions in shared libraries 
from within Tcl scripts via either the libffi or dyncall open source 
libraries. The package supports Tcl 8.6 and 9.0+.

Docs: https://cffi.magicsplat.com/
Repository: https://github.com/apnadkarni/tcl-cffi
Downloads (source and Windows binaries): 
https://sourceforge.net/projects/magicsplat/files/cffi

Tested on Windows 10, Linux (Ubuntu 20, 22) and MacOS 12

In addition to Tcl 9 support, 2.0 has significant feature enhancements.
See https://github.com/apnadkarni/tcl-cffi/blob/main/CHANGES.md

Click on article to view the messages of the thread
ANNOUNCE: tclcsv 2.4.2 released
Posted by Ashok <apnmbx-public@yahoo.com> 2 days 2 hours ago
Last contribution 1 day 14 hours ago 5
Replies:
  • ted@loft.tnolan.com (Ted Nolan <tednolan>) replied 1 day 14 hours ago
  • Ashok <apnmbx-public@yahoo.com> replied 1 day 16 hours ago
  • Ashok <apnmbx-public@yahoo.com> replied 1 day 16 hours ago
  • Paul Obermeier <obermeier@poSoft.de> replied 2 days 1 hour ago
  • ted@loft.tnolan.com (Ted Nolan <tednolan>) replied 2 days 1 hour ago
tclcsv 2.4.2 released - update for Tcl 9.

The tclcsv extension for Tcl provides a fast and flexible means of 
reading and writing text files in Comma Separated Value (CSV) format.
Includes a UI widget for sniffing CSV dialects.

Docs: https://tclcsv.magicsplat.com
Download: https://sourceforge.net/projects/tclcsv/files/
Repository:https://github.com/apnadkarni/tcl-csv

Click on article to view the messages of the thread
how to pass /E:ON argument to cmd.exe using exec (Windows)
Posted by Michael Soyka <mssr953@gmail.com> 2 days 3 hours ago
Last contribution 1 day 22 hours ago 5
Replies:
  • Michael Soyka <mssr953@gmail.com> replied 1 day 22 hours ago
  • et99 <et99@rocketship1.me> replied 2 days ago
  • et99 <et99@rocketship1.me> replied 2 days 1 hour ago
  • Michael Soyka <mssr953@gmail.com> replied 2 days 2 hours ago
  • Ashok <apnmbx-public@yahoo.com> replied 2 days 2 hours ago
For a change of pace, this will not be a Tcl 9 question (I'm using 8.6.14).

Using tclsh, why does this succeed:
     exec -- cmd /C dir

but this fails:
     exec -- cmd /C /E:ON dir

with this message :
     "The filename, directory name, or volume label syntax is incorrect."

I'm guessing that "exec" is treating /E:ON as a file spec (the colon 
maybe?) and then changes it somehow.

A followup question is how can I see what string is being presented to 
to Windows?

Thanks for answering.

-mike

Click on article to view the messages of the thread
Announce: Img 2.0.0 released
Posted by Paul Obermeier <obermeier@poSoft.de> 1 day 23 hours ago
Last contribution 1 day 23 hours ago 0
Dear Tcl/Tk community.

The new major version 2.0.0 of Img is ready.

The major changes compared to the 1.4 version are:
     - Support for image metadata as introduced with Tk 8.7 and 9.0.
     - Image subcommand "data" now returns binary strings as does Tk.
     - Extended and corrected test suites and documentation.
     - Lots of security and stability fixes.

A more detailed change list is available at https://tkimg.sourceforge.net/history.html

Get the source code release as single file from
https://sourceforge.net/projects/tkimg/files/tkimg/2.0/tkimg%202.0.0

Provide feedback either via the SourceForge ticket system or via mail.

Paul

Click on article to view the messages of the thread
ANNOUNCE: cookit v2.2.0
Posted by Konstantin Kushnir <chpock@gmail.com> 5 days 4 hours ago
Last contribution 2 days 6 hours ago 5
Replies:
  • Konstantin Kushnir <chpock@gmail.com> replied 2 days 6 hours ago
  • Losko <xefog66666@dxice.com> replied 2 days 8 hours ago
  • Manfred Stelzhammer <manfred@antispam.at> replied 3 days 2 hours ago
  • Konstantin Kushnir <chpock@gmail.com> replied 4 days 6 hours ago
  • Ashok <apnmbx-public@yahoo.com> replied 4 days 15 hours ago
Hi Everyone!

I am pleased to announce version 2.2.0 of cookit - tclkit-like Tcl
runtime environment with Tcl 8.6.15 and Tcl 9.0.0 with a focus on a
balance between functionality and executable size

Homepage and downloads are on github: https://github.com/chpock/cookit

Here is just a basic description of it. All details can be found on the
website home page.

Please fill free to check/build/use it. Any feedback is welcome!

=====================================================================

Cookit is a Tcl/Tk runtime environment similar to tclkit with a focus
on a balance between functionality and executable size. It allows using
Tcl/Tk in both console mode and graphical mode to run Tcl scripts, as
well as packaging applications into a single executable without
external dependencies.

Cookit is a single executable file that contains:

  * Tcl/Tk version 8.6.15 (with Threads enabled) or 9.0.0
  * Statically linked packages: cookfs, tclvfs, Threads, tclmtls, tdom,
    twapi (for Windows platform)
  * Other packages: tkcon

Supported platforms:

  * Linux x86 / x86_64
  * Windows x86 / x86_64
  * macOS x86_64

This means that Cookit can be easily and simply used to develop both
console and GUI applications, which can be multi-threaded, send HTTPS
requests to third-party services, process the received JSON/XML
response with tdom. For debugging in GUI mode a convenient and uniform
on all platforms console tkcon is available. After development, the
application can be packaged into a single executable file without
dependencies and used in other environments as a standalone application.

It can also be used as a replacement for tclsh/wish.

At the same time, the executable file has minimal size.

  * for Linux platform: executable file without Tk - about 1.1MB,
    executable file with Tk - about 1.7MB
  * for Windows platform: executable without Tk - about 1.5MB,
    executable with Tk - about 2MB.

This is an amazing size considering the ability to create GUI
applications with support for SSL/TLS connections, work with JSON/XML
documents, extensive access to WinAPI using twapi on Windows platform.
In normal installations, only the size of the OpenSSL library will be 2
times larger.

As a use case, consider an internal installer that works in both
console and GUI mode and contains the same code for all platforms. This
installer uses the REST GitHub API via HTTPS to get information about
the latest available release, uses tdom to parse the JSON response,
downloads a platform-appropriate tar.gz archive from GitHub releases
using HTTPS, mounts the resulting tar.gz archive using tclvfs and
extracts the necessary files to the destination directory.

-- 
Best regards,
Konstantin Kushnir

Click on article to view the messages of the thread
tcltls v1.7.23 and Tcl 9
Posted by Alan Grunwald <nospam.nurdglaw@gmail.com> 3 days 6 hours ago
Last contribution 2 days 6 hours ago 5
Replies:
  • Emiliano <emil.g@example.invalid> replied 2 days 6 hours ago
  • Alan Grunwald <nospam.nurdglaw@gmail.com> replied 2 days 22 hours ago
  • Paul Obermeier <obermeier@poSoft.de> replied 3 days 1 hour ago
  • Paul Obermeier <obermeier@poSoft.de> replied 3 days 3 hours ago
  • Alan Grunwald <nospam.nurdglaw@gmail.com> replied 3 days 5 hours ago
I have encountered a problem with the above extension under tcl9.0.0

After downloading 
https://www.tcl3d.org/bawt/download/Preview/Tcl9/tcltls-1.7.23.7z, as 
advertised on the "Porting extensions to Tcl 9" page on the wiki, 
configuring using the line

../configure --prefix=/opt/tcl9.0.0 --with-tcl=/opt/tcl9.0.0/lib

building and installing, I cannot load the extension:

     % package require tls
     version conflict for package "tcl": have 9.0.0, need 8.4

The same error also occurs if I do

     % load /opt/tcl9.0.0/lib/tcltls1.7.23/tcltls.so Tls

so I assume a problem in the .so file. I've had a quick look through the 
sources, but I have no confidence that I can find the appropriate change.

Please can someone help?

Click on article to view the messages of the thread
nx crashed with tcl 9.0
Posted by Manfred Stelzhammer <manfred@antispam.at> 4 days 3 hours ago
Last contribution 2 days 9 hours ago 5
Replies:
  • Stefan Sobernig <stefan.sobernig@wu.ac.at> replied 2 days 9 hours ago
  • Manfred Stelzhammer <manfred@antispam.at> replied 3 days 2 hours ago
  • Paul Obermeier <obermeier@poSoft.de> replied 3 days 21 hours ago
  • Manfred Stelzhammer <manfred@antispam.at> replied 3 days 22 hours ago
  • Gerald Lester <Gerald.Lester@gmail.com> replied 3 days 23 hours ago
Hi


If I'll use the package nx on tcl 9.0 it crashed with:

Speicherzugriffsfehler (Speicherabzug geschrieben)

in english:
Memory access error (memory dump written)

What's wrong?


regards

Manfred

Click on article to view the messages of the thread
ANNOUNCE: iocp 2.0b1
Posted by Ashok <apnmbx-public@yahoo.com> 2 days 11 hours ago
Last contribution 2 days 11 hours ago 0
This update adds support for Tcl 9.

Tcl extension implementing TCP and Bluetooth channels based on I/O 
completion ports. The iocp_inet package is API-compatible with Tcl 
sockets while offering much higher performance.

Requires Tcl 8.6 or Tcl 9 and Windows 7 or later.

Binary downloads are at 
https://sourceforge.net/projects/magicsplat/files/iocp/. The single 
package supports all combinations of Tcl 8.6/9 and 32/64-bit Intel 
platforms.

Documentation at https://iocp.magicsplat.com.

Click on article to view the messages of the thread
Packages won't run on Tcl/Tk 9.0
Posted by Luc <luc@sep.invalid> 4 days 13 hours ago
Last contribution 2 days 12 hours ago 6
Replies:
  • Ashok <apnmbx-public@yahoo.com> replied 2 days 12 hours ago
  • Christian Gollwitzer <auriocus@gmx.de> replied 2 days 23 hours ago
  • Luc <luc@sep.invalid> replied 3 days 6 hours ago
  • Ashok <apnmbx-public@yahoo.com> replied 3 days 9 hours ago
  • Luc <luc@sep.invalid> replied 3 days 22 hours ago
  • Ashok <apnmbx-public@yahoo.com> replied 4 days 1 hour ago
I successfully compiled Tcl and Tk 8.6.15 and 9.0.

No problem whatsoever with 8.6.15 so far.

Tcl/Tk 9.0 runs a couple of simpler applications but chokes on a
more complex one:

--------------------
cannot find symbol "tkdnd_Init": /opt/tcltk9/lib/tkdnd2.6/libtkdnd2.6.so:
undefined symbol: _tkdnd_Init while executing
"load $dir/$PKG_LIB_FILE $PACKAGE_NAME"
    (procedure "tkdnd::initialise" line 92)
    invoked from within
"tkdnd::initialise {/opt/tcltk9/lib/tkdnd2.6} libtkdnd2.6.so tkdnd"
    ("package ifneeded tkdnd 2.6" script)
    invoked from within
"package require tkdnd"
    (file "v.tcl" line 4)
Compilation failed.
--------------------

Yes, my version of tkdnd is quite old. I'm not even using it yet.
I haven't written the code. But it is package required for the sake 
of the future.

So I fetched a newer version. Tck/Tk 9.0 doesn't like it either:

--------------------
interpreter uses an incompatible stubs mechanism
    while executing
"load $dir/$PKG_LIB_FILE [string totitle $PACKAGE_NAME 0 0]"
    (procedure "tkdnd::initialise" line 94)
    invoked from within
"tkdnd::initialise {/opt/tcltk9/lib/tkdnd2.9.4} libtkdnd2.9.4.so tkdnd"
    ("package ifneeded tkdnd 2.9.4" script)
    invoked from within
"package require tkdnd"
    (file "v.tcl" line 4)
Compilation failed.
--------------------

What is going on now? Well, I commented out the tkdnd line and found 
that I have a similar problem with snack:

--------------------
interpreter uses an incompatible stubs mechanism
    while executing
"load /usr/lib/tcltk/snack2.2/libsound.so"
    ("package ifneeded sound 2.2" script)
    invoked from within
"package require sound"
    (file "v.tcl" line 6)
Compilation failed.
--------------------

Is it too old too? Comment it out:

--------------------
interpreter uses an incompatible stubs mechanism
    while executing
"load [file join $::vfs::self libvfs1.4.2.so]"
    (file "/usr/lib/tcltk/x86_64-linux-gnu/vfs1.4.2/vfs.tcl" line 24)
    invoked from within
"source /usr/lib/tcltk/x86_64-linux-gnu/vfs1.4.2/vfs.tcl"
    ("package ifneeded vfs 1.4.2" script)
    invoked from within
"package require vfs"
    (file "v.tcl" line 8)
Compilation failed.
--------------------

Removing references to vfs, I run into a variable that is no longer
recognized. OK, I will investigate that one on my own.

What about the packages? Why do they fail? 
Note: I am running all this on Debian 9.

I wonder if this is related:
https://core.tcl-lang.org/tk/info/437d5d47664539497a827310263ad691e85f6ca829eb0cf77ad97edf55220b70


-- 
Luc
>>

Click on article to view the messages of the thread
famfamfam and tcl9
Posted by Alan Grunwald <nospam.nurdglaw@gmail.com> 2 days 22 hours ago
Last contribution 2 days 22 hours ago 0
I had to make a few simple changes to famfamfam 1.1 to make it work on Tcl9.

If anyone needs the package before it gets sorted out, please ask for 
details by following up in this thread.

Click on article to view the messages of the thread
OOP design choices
Posted by Luc <luc@sep.invalid> 3 days 6 hours ago
Last contribution 3 days 2 hours ago 1
Replies:
  • Rich <rich@example.invalid> replied 3 days 2 hours ago
I am rewriting my application which has tabs.

Now I hesitate. Which is better?

1. Create the overall GUI and code as procedural and the tabs as 
objects/a class.

2. Create the overall GUI as a big object (superclass) with tabs as 
subclasses.

3. Create the overall GUI as an object/class with tabs as separate
classes.

4. Create the overall GUI as a big object (superclass) with tabs as 
methods.

Thank you for any ideas.


-- 
Luc
>>

Click on article to view the messages of the thread
ANNOUNCE: Tcl Windows API 5.0 Beta 1
Posted by Ashok <apnmbx-public@yahoo.com> 3 days 13 hours ago
Last contribution 3 days 13 hours ago 0
Difference from 4.7.2:

     Adds support for Tcl 9.
     Drops support for Windows versions prior to Windows 7 SP1.
     Drops the "modular" and "binary" build configurations.


# Tcl Windows API (TWAPI) extension

The Tcl Windows API (TWAPI) extension provides access to the Windows API
from within the Tcl scripting language.

   * Project source repository is at https://github.com/apnadkarni/twapi
   * Documentation is at https://twapi.magicsplat.com
   * Binary distribution is at 
https://sourceforge.net/projects/twapi/files/Current%20Releases/Tcl%20Windows%20API/

## Supported platforms

TWAPI 5.0 requires

   * Windows 7 SP1 or later
   * Tcl 8.6.10+ or Tcl 9.x

### Binary distribution

The single binary distribution supports Tcl 8.6 and Tcl 9 for both 32-
and 64-bit platforms.

It requires the VC++ runtime to already be installed on the system.
Download from
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
if necessary.

Windows 7 and 8.x also require the Windows UCRT runtime to be installed
if not present. Download from
https://support.microsoft.com/en-gb/topic/update-for-universal-c-runtime-in-windows-c0514201-7fe6-95a3-b0a5-287930f3560c.

In most cases, both the above should already be present on the system.

Note that the *modular* and single file *bin* in 4.x distributions are
no longer available and will not be supported in 5.0.

## TWAPI Summary

The Tcl Windows API (TWAPI) extension provides access to the Windows API
from within the Tcl scripting language.

Functions in the following areas are implemented:

   * System functions including OS and CPU information,
     shutdown and message formatting
   * User and group management
   * COM client and server support
   * Security and resource access control
   * Window management
   * User input: generate key/mouse input and hotkeys
   * Basic sound playback functions
   * Windows services
   * Windows event log access
   * Windows event tracing
   * Process and thread management
   * Directory change monitoring
   * Lan Manager and file and print shares
   * Drive information, file system types etc.
   * Network configuration and statistics
   * Network connection monitoring and control
   * Named pipes
   * Clipboard access
   * Taskbar icons and notifications
   * Console mode functions
   * Window stations and desktops
   * Internationalization
   * Task scheduling
   * Shell functions
   * Registry
   * Windows Management Instrumentation
   * Windows Installer
   * Synchronization
   * Power management
   * Device I/O and management
   * Crypto API and certificates
   * SSL/TLS
   * Windows Performance Counters

Click on article to view the messages of the thread
ANNOUNCE: tcl9-migrate 1.0 released
Posted by Ashok <apnmbx-public@yahoo.com> 4 days 15 hours ago
Last contribution 4 days 15 hours ago 0
Docs: https://github.com/apnadkarni/tcl9-migrate/blob/v1.0/README.md
Download: https://github.com/apnadkarni/tcl9-migrate/releases/tag/v1.0

This software is intended to help identify changes needed for migrating 
Tcl 8 scripts to Tcl 9. It has two modes of operation:

- a static analyzer based on Nagelfar that runs under both Tcl 8.6 and 9 
logging warnings for potential incompatibilities.

- a runtime analyzer. This is intended to only run under Tcl 9. It 
attempts to fix up invalid code (e.g. encodings, tilde references) at 
run time allowing the program to continue to run but logs warnings to 
stderr.

These tools only target Tcl script level incompatibilities. In 
particular, neither the C API nor Tk command incompatibilities are 
addressed.

Click on article to view the messages of the thread
Does cheating produce faster searches?
Posted by Luc <luc@sep.invalid> 6 days 23 hours ago
Last contribution 5 days 6 hours ago 4
Replies:
  • Rich <rich@example.invalid> replied 5 days 6 hours ago
  • Luc <luc@sep.invalid> replied 5 days 16 hours ago
  • Shaun Deacon <sdeacon@us.socionext.com> replied 5 days 17 hours ago
  • Rich <rich@example.invalid> replied 6 days 22 hours ago
Suppose I have a large list. Very large list. Then I want to search 
for an item in that string:

% lsearch $list "string"

Now, suppose I have many lists instead. One list contains all the items 
that begin with the letter a, another list contains all the items that 
begin with the letter b, another list contains all the items that begin 
with the letter c, and so on. Then I see what the first character in 
"string" is and only search for it in the one corresponding list. 
Would that be faster? I somehow suspect the answer is 'no.'

Bonus question: what about sqlite operations? Would they be faster if 
I had one separate table for each initial letter/character?

TIA

-- 
Luc
>>

Click on article to view the messages of the thread
ANNOUNCE: dbus 4.1
Posted by Schelte <nospam@wanadoo.nl> 5 days 6 hours ago
Last contribution 5 days 6 hours ago 0
I am pleased to announce the release of version 4.1 of the Tcl dbus package.

The DBus project provides a Tcl interface to the dbus message bus 
system, a popular system for applications to talk to each other. DBus 
can also be used to coordinate the lifecycle of processes.
For more information about DBus, visit
         http://www.freedesktop.org/wiki/Software/dbus

The Tcl dbus package provides a new Tcl command called dbus that allows 
Tcl programs to connect to any available dbus, send and receive signals, 
execute method calls in other applications, and handle method calls 
invoked by other applications.

Version 4.1 adds compatibility with Tcl 9.

Website: https://chiselapp.com/user/schelte/repository/dbus/


Regards,
Schelte

Click on article to view the messages of the thread
Lost in Ashok's teachings
Posted by Luc <luc@sep.invalid> 6 days 11 hours ago
Last contribution 5 days 16 hours ago 7
Replies:
  • Rich <rich@example.invalid> replied 5 days 16 hours ago
  • Luc <luc@sep.invalid> replied 5 days 17 hours ago
  • Rich <rich@example.invalid> replied 5 days 20 hours ago
  • Ralf Fassel <ralfixx@gmx.de> replied 6 days 2 hours ago
  • Ashok <apnmbx-public@yahoo.com> replied 6 days 2 hours ago
  • Luc <luc@sep.invalid> replied 6 days 6 hours ago
  • Ralf Fassel <ralfixx@gmx.de> replied 6 days 10 hours ago
I am trying to learn from this page:

https://www.magicsplat.com/articles/oo.html

It is written by the legendary Ashok. The author that so many people
here so often rush to recommend.

I am not getting along well with it.

His first lesson: create a class:

% oo::class create Account

Next lesson: defining data members:

% oo::define Account {
    variable AccountNumber Balance
}

Then, defining methods:

oo::define Account {
    method UpdateBalance {change} {
        set Balance [+ $Balance $change]
        return $Balance
    }
    method balance {} { return $Balance }
    method withdraw {amount} {
        return [my UpdateBalance -$amount]
    }
    method deposit {amount} {
        return [my UpdateBalance $amount]
    }
	export UpdateBalance
}

Sadly, Ashok embraces the most traditional way of teaching programming=20
or anything related to IT: assuming the reader is some kind of ChatGPT
sponge that can instantly absorb all and any information that is fed
along the way, so he distracts me with a lot of additional information=20
that I REALLY think should only be fed later, and which I am skipping here.

But I had to take note of this:
"Methods that begin with a lower case letter are exported by default.=20
Thus in our example, deposit and withdraw are exported methods while=20
UpdateBalance is not. Method visibility can be changed by using the=20
export and unexport commands inside a oo::define class definition script.=20
Thus
oo::define Account {export UpdateBalance}

OK. I did that. So here is my script:

----------- oop.tcl -----------------
oo::class create Account
oo::define Account {
    variable AccountNumber Balance
}

oo::define Account {
    method UpdateBalance {change} {
        set Balance [+ $Balance $change]
        return $Balance
    }
    method balance {} { return $Balance }
    method withdraw {amount} {
        return [my UpdateBalance -$amount]
    }
    method deposit {amount} {
        return [my UpdateBalance $amount]
    }
    export UpdateBalance
}
----------------------------------

And he provides zero information on how to USE that thing. Zero.=20
Instead, he goes on and on about a lot of other information that I=20
REALLY think should be reserved for later.

Finally, I run into "3. Working with objects"

% set acct [Account new 3-14159265]
% Account create smith_account 2-71828182

OK. So I add those two lines to my script. Upon running it, no complaints
by the compiler. But there is no output either. Let's add some action:

----------- oop.tcl -----------------
oo::class create Account
oo::define Account {
    variable AccountNumber Balance
}

oo::define Account {
    method UpdateBalance {change} {
        set Balance [+ $Balance $change]
        return $Balance
    }
    method balance {} { return $Balance }
    method withdraw {amount} {
        return [my UpdateBalance -$amount]
    }
    method deposit {amount} {
        return [my UpdateBalance $amount]
    }
}

oo::define Account {export UpdateBalance}
set acct [Account new 3-14159265]
Account create smith_account 2-71828182
$acct deposit 132
----------------------------------

There, I broke the toy.

can't read "Balance": no such variable
    while executing
"+ $Balance $change"
    (class "::Account" method "UpdateBalance" line 2)
    invoked from within
"my UpdateBalance $amount"
    (class "::Account" method "deposit" line 2)
    invoked from within
"$acct deposit 132"
    (file "oop.tcl" line 41)
Compilation failed.

I tried a lot of ideas and all of them run into the same problem:
the compiler has no knowledge of this Balance variable I speak of.

Reading on, I find this:

3.3. Invoking methods

This is the form used to invoke a method on the object from code=20
=E2=80=9Coutside=E2=80=9D the object.

% $acct balance
=E2=86=92 1000000
% $acct deposit 1000
=E2=86=92 1001000


Oh yeah? OK. Let's add those lines to the script then:

$acct balance
can't read "Balance": no such variable
    while executing
"return $Balance "
    (class "::Account" method "balance" line 1)
    invoked from within
"$acct balance"
    (file "oop.tcl" line 41)
Compilation failed.


$acct deposit 1000
can't read "Balance": no such variable
    while executing
"+ $Balance $change"
    (class "::Account" method "UpdateBalance" line 2)
    invoked from within
"my UpdateBalance $amount"
    (class "::Account" method "deposit" line 2)
    invoked from within
"$acct deposit 1000"
    (file "oop.tcl" line 41)
Compilation failed.


I wonder if the code provided in the explanation is really correct
and tested. Why is the 'Balance' variable adamantly not recognized?

I am also intrigued by this line:

set Balance [+ $Balance $change]

Where did he ever define '+' as a command? There is zero explanation
of it.

I am very confused. Any comments, please?

--=20
Luc
>>

Click on article to view the messages of the thread
Looking for OOP ideas
Posted by Luc <luc@sep.invalid> 6 days 23 hours ago
Last contribution 5 days 16 hours ago 4
Replies:
  • Luc <luc@sep.invalid> replied 5 days 16 hours ago
  • et99 <et99@rocketship1.me> replied 6 days ago
  • Luc <luc@sep.invalid> replied 6 days 6 hours ago
  • Ralf Fassel <ralfixx@gmx.de> replied 6 days 9 hours ago
Here I am again. I still haven't learned OOP and have been feeling 
like trying again. What I ask of you this time is ideas for practicing. 
It's hard for me to come up with them because I am not sufficiently 
familiar with OOP. I would like you to suggest some kind of project 
I can tackle to practice as much OOP as possible. It doesn't have to be 
anything really useful or practical. The goal is not to make any kind 
of application, but rather just practice OOP. I would like something 
that requires a lot of repetition, something that forces me to toy 
with typical OOP mechanisms over and over. I think I will prefer 
using Snit, but I am not really sure. 

Thank you for any ideas.

-- 
Luc
>>

Click on article to view the messages of the thread
Tk 9.0.0 RELEASED
Posted by Don Porter <donald.porter@nist.gov> 6 days ago
Last contribution 6 days ago 0
Tk 9.0.0 Release Announcement
==============================

September 26, 2024

The Tcl Core Team is pleased to announce the release of Tk 9.0.0.
This is the first stable release of Tk 9.0.  This should replace all
prior alpha or beta releases.

The Tk Toolkit is an extension to Tcl, providing commands and supports
for the creation of graphical user interfaces.  Tk originates with John
Ousterhout and his team at U.C. Berkeley in the late 1980s.  Its development
is continued by the efforts of a global network of volunteers guided by
the Tcl Core Team.

We would like to express our gratitude to all those who submit bug
reports and patches.  This information is invaluable in enabling us
to identify and eliminate problems. Such reports can be submitted here.

> [Tk Ticket Tracker](https://core.tcl-lang.org/tk/ticket)

We ask that you log in (anonymous if you wish) to create tickets.
This deters abuse of the ticketing system:

> [Tk Contributor Login](https://core.tcl-lang.org/tk/login)

Where to get the new releases
=============================

Tk 9.0.0 sources are freely available as open source from the Tcl
SourceForge project's file distribution area:

> [Tcl Source Distribution](https://sourceforge.net/projects/tcl/files/)

The Tk 9.0.0 distribution is source code only.  We keep links to some
third parties offering pre-built binaries for various systems here:

> [Tcl Binary Distribution](https://www.tcl-lang.org/software/tcltk/bindist.html)

Tk 9 Release Summary
=====================

This is a new major version of Tk.  When compared with the prior release
Tk 8.6, there are new features to be enjoyed.  There are incompatibilities
to be considered.  A summary of the most noteworthy changes is found below.

Tk 9.0.0 does not support Tcl 8.6.  Tk 9.0.0 extends Tcl 9.0.0.  To make
use of Tk 9.0.0, first the new Tcl release, Tcl 9.0.0, needs to be present.
As new Tk features are developed, expect them to appear in Tk 9, but not
necessarily in Tk 8.6.

We believe many Tcl programs written for Tcl/Tk 8 will run unchanged
in Tcl/Tk 9.  We believe many more Tcl programs can be modified in small
and simple ways to produce a new program that runs in both Tcl 8 and Tcl 9.
We expect that extensions and applications using public C APIs of Tcl
and Tk will involve more effort, but that it is still within reasonable
reach to produce source code supporting both Tcl 8 and Tcl 9 while both
releases remain in widespread use.

The experiences of Tcl/Tk 8 users adapting their code to Tcl/Tk 9 will
determine the need for possible Tcl 8.7 releases that might supply
additional lifecycle and migration support.  Please use the Ticket Trackers
to share your experiences and difficulties.

See the following links for an accumulation of migration advice:

[Migrating C extensions to Tcl 9]
(https://core.tcl-lang.org/tcl/wiki?name=Migrating+C+extensions+to+Tcl+9)

[Migrating scripts to Tcl 9]
(https://core.tcl-lang.org/tcl/wiki?name=Migrating+scripts+to+Tcl+9)

There has been much progress already porting many known applications,
extensions, and packages in the Tcl world to compatibility with Tcl/Tk 9:

[Apps confirmed to work with Tcl/Tk 9]
(https://wiki.tcl-lang.org/page/Apps+confirmed+to+work+with+Tcl+9)

[Porting extensions to Tcl 9]
(https://wiki.tcl-lang.org/page/Porting+extensions+to+Tcl+9)

Tcl Improvement Proposals (TIPs)
================================

Each new user-visible feature in Tk should find its origins in a Tcl
Improvement Proposal (TIP).  TIPs are published, edited, considered and
voted in public, and should contain valuable information about how a
feature came to be the way it is.  See the full collection here:

> [TIP Index](https://tip.tcl-lang.org/)

Tk Changes Summary
===================

The source code for Tk is managed by fossil.  Tk developers coordinate all
changes to the Tk source code at

> [Tk Source Code](https://core.tcl-lang.org/tk/)

Release Tk 9.0.0 arises from the check-in with tag core-9-0-0.

Highlighted differences between Tk 9.0 and Tk 8.6 are summarized below,
with focus on changes important to programmers using the Tk library and
writing Tcl scripts containing Tk commands.

## Many improvements to use of platform features and conventions
  - Built-in widgets and themes are scaling-aware
  - Improved support of two-finger gestures, where available
  - The `tk windowingsystem` "aqua" needs macOS 10.10 or later

## New commands and options
  - `tk sysnotify` — Access to the OS notifications system
  - `tk systray` — Access to the OS tray facility
  - `tk print` — Access to the OS printing facility

## Widget options
  - New `ttk::progressbar` option: **-text**
  - `$frame ... -backgroundimage $img -tile $bool`
  - `$menu id`, `$menu add|insert ... ?$id? ...`
  - `$image get ... -withalpha ...`
  - All indices now accept the forms **end**, **end-int**, **int+|-int**

## Improved widget appearance
  - `ttk::notebook` with nondefault tab positions

## Images
  - Partial SVG support
  - Read/write access to photo image metadata

## Known bugs
  - [Use of Tcl_Obj vs char * in Widget storage](https://core.tcl-lang.org/tk/tktview/f91aa2)
  - [Tilde file syntax not available on 9.0 but used by "~/.Xdefaults"](https://core.tcl-lang.org/tk/tktview/fcfddc)
  - [many PIXEL options don't keep their configured value](https://core.tcl-lang.org/tk/tktview/29ba53)
  - [Canvas widget handles pixel objects incorrectly in Tk 9.0](https://core.tcl-lang.org/tk/tktview/610a73)
  - [Inconsistent reporting of child geometry changes to grid container](https://core.tcl-lang.org/tk/tktview/beaa8e)
  - [Inconsistency in whether widgets allow negative borderwidths](https://core.tcl-lang.org/tk/tktview/5f739d)
  - [Enter key works differently in Windows and Linux](https://core.tcl-lang.org/tk/tktview/b3a1b9)
  - [slow widget creation if default font is not used](https://core.tcl-lang.org/tk/tktview/8da7af)
  - [The wm manage command does not work on current macOS versions](https://core.tcl-lang.org/tk/tktview/8a6012)
  - [Slow processing irregular transparencies](https://core.tcl-lang.org/tk/tktview/919066)
  - [text's cursor width on 0th column](https://core.tcl-lang.org/tk/tktview/47fbfc)
  - [text widget breaks graphemes with combining diacritical marks](https://core.tcl-lang.org/tk/tktview/442208)

For additional information:
===========================

Please visit the Tcl Developer Xchange web site:

> [Tcl Developer Xchange](https://www.tcl-lang.org/)

This site contains a variety of information about Tcl/Tk in general, the
core Tcl and Tk distributions, Tcl development tools, and much more.

--
Tcl Core Team and Maintainers
Don Porter, Tcl Core Release Manager

-- 
| Don Porter            Applied and Computational Mathematics Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

Click on article to view the messages of the thread
Tcl 9.0.0 RELEASED
Posted by Don Porter <donald.porter@nist.gov> 6 days ago
Last contribution 6 days ago 0
Tcl 9.0.0 Release Announcement
==============================

September 26, 2024

The Tcl Core Team is pleased to announce the release of Tcl 9.0.0.
This is the first stable release of Tcl 9.0.  This should replace all
prior alpha or beta releases.

Tcl is the Tool Command Language originated by John Ousterhout and his
team at U.C. Berkeley in the late 1980s.  Its development is continued
by the efforts of a global network of volunteers guided by the Tcl Core Team.

We would like to express our gratitude to all those who submit bug
reports and patches.  This information is invaluable in enabling us
to identify and eliminate problems. Such reports can be submitted here.

> [Tcl Ticket Tracker](https://core.tcl-lang.org/tcl/ticket)

We ask that you log in (anonymous if you wish) to create tickets.
This deters abuse of the ticketing system:

> [Tcl Contributor Login](https://core.tcl-lang.org/tcl/login)

Where to get the new releases
=============================

Tcl 9.0.0 sources are freely available as open source from the Tcl
SourceForge project's file distribution area:

> [Tcl Source Distribution](https://sourceforge.net/projects/tcl/files/)

The Tcl 9.0.0 distribution is source code only.  We keep links to some
third parties offering pre-built binaries for various systems here:

> [Tcl Binary Distribution](https://www.tcl-lang.org/software/tcltk/bindist.html)

Tcl Summary
===========

The Tcl distribution delivers C source code that builds into a C library
providing interpreters and related supports to execute programs  written
in the Tcl programming language.  Source code for the application program
`tclsh` is also included.  `tclsh` provides a shell for either interactive
execution of Tcl commands, or execution of files containing Tcl programs.

Tcl is an extensible language, and the Tcl C library provides interfaces
for the creation of extension libraries adding new commands and features
to the core Tcl command set.  Tcl 9 debuts the full feature set needed to
package an application written in C and Tcl into a single file executable
exploiting virtual filesystem archives.

Tcl 9 Release Summary
=====================

This is a new major version of Tcl.  When compared with the prior release
Tcl 8.6, there are new features to be enjoyed.  There are incompatibilities
to be considered.  A summary of the most noteworthy changes is found below.

We believe many Tcl programs written for Tcl 8 will run unchanged in Tcl 9.
We believe many more Tcl programs can be modified in small and simple ways
to produce a new program that runs in both Tcl 8 and Tcl 9.  We expect that
extensions and applications using Tcl's public C APIs will involve more
effort, but that it is still within reasonable reach to produce source code
supporting both Tcl 8 and Tcl 9 while both releases remain in widespread use.

The experiences of Tcl 8 users adapting their code to Tcl 9 will determine
the need for possible Tcl 8.7 releases that might supply additional lifecycle
and migration support.  Please use the Ticket Tracker to share your experiences
and difficulties.

See the following links for an accumulation of migration advice:

[Migrating C extensions to Tcl 9]
(https://core.tcl-lang.org/tcl/wiki?name=Migrating+C+extensions+to+Tcl+9)

[Migrating scripts to Tcl 9]
(https://core.tcl-lang.org/tcl/wiki?name=Migrating+scripts+to+Tcl+9)

There has been much progress already porting many known applications,
extensions, and packages in the Tcl world to compatibility with Tcl/Tk 9:

[Apps confirmed to work with Tcl 9]
(https://wiki.tcl-lang.org/page/Apps+confirmed+to+work+with+Tcl+9)

[Porting extensions to Tcl 9]
(https://wiki.tcl-lang.org/page/Porting+extensions+to+Tcl+9)

Tcl Improvement Proposals (TIPs)
================================

Each new user-visible feature in Tcl should find its origins in a Tcl
Improvement Proposal (TIP).  TIPs are published, edited, considered and
voted in public, and should contain valuable information about how a
feature came to be the way it is.  See the full collection here:

> [TIP Index](https://tip.tcl-lang.org/)

Tcl Changes Summary
===================

(from changes.md in the source code distribution)

The source code for Tcl is managed by fossil.  Tcl developers coordinate all
changes to the Tcl source code at

> [Tcl Source Code](https://core.tcl-lang.org/tcl/timeline)

Release Tcl 9.0.0 arises from the check-in with tag `core-9-0-0`.

Highlighted differences between Tcl 9.0 and Tcl 8.6 are summarized below,
with focus on changes important to programmers using the Tcl library and
writing Tcl scripts.

# Major Features

## 64-bit capacity: Data values larger than 2 GB
  - Strings can be any length (that fits in your available memory)
  - Lists and dictionaries can have very large numbers of elements

## Internationalization of text
  - Full Unicode range of codepoints
  - New encodings: `utf-16`/`utf-32`/`ucs-2`(`le`|`be`), `CESU-8`, etc.
  - `encoding` options `-profile`, `-failindex` manage encoding of I/O.
  - `msgcat` supports custom locale search list
  - `source` defaults to `-encoding utf-8`

## Zip filesystems and attached archives
  - Packaging of the Tcl script library with the Tcl binary library,
    meaning that the `TCL_LIBRARY` environment variable is usually not required.
  - Packaging of an application into a virtual filesystem is now a supported
    core Tcl feature.

## Unix notifiers available using `epoll()` or `kqueue()`
  - This relieves limits on file descriptors imposed by legacy `select()` and fixes a performance bottleneck.

# Incompatibilities

## Notable incompatibilities
  - Unqualified varnames resolved in current namespace, not global.
    Note that in almost all cases where this causes a change, the change is actually the removal of a latent bug.
  - No `--disable-threads` build option.  Always thread-enabled.
  - I/O malencoding default response: raise error (`-profile strict`)
  - Windows platform needs Windows 7 or Windows Server 2008 R2 or later
  - Ended interpretation of `~` as home directory in pathnames.
    (See `file home` and `file tildeexpand` for replacements when you need them.)
  - Removed the `identity` encoding.
    (There were only ever very few valid use cases for this; almost all uses
    were systematically wrong.)
  - Removed the encoding alias `binary` to `iso8859-1`.
  - `$::tcl_precision` no longer controls string generation of doubles.
    (If you need a particular precision, use `format`.)
  - Removed pre-Tcl 8 legacies: `case`, `puts` and `read` variant syntaxes.
  - Removed subcommands [`trace variable`|`vdelete`|`vinfo`]
  - Removed `-eofchar` option for write channels.
  - On Windows 10+ (Version 1903 or higher), system encoding is always utf-8.
  - `%b`/`%d`/`%o`/`%x` format modifiers (without size modifier) for `format`
    and `scan` always truncate to 32-bits on all platforms.
  - `%L` size modifier for `scan` no longer truncates to 64-bit.
  - Removed command `::tcl::unsupported::inject`.
    (See `coroinject` and `coroprobe` for supported commands with significantly
    more comprehensible semantics.)

## Incompatibilities in C public interface
  - Extensions built against Tcl 8.6 and before will not work with Tcl 9.0;
    ABI compatibility was a non-goal for 9.0.  In _most_ cases, rebuilding
    against Tcl 9.0 should work except when a removed API function is used.
  - Many arguments expanded type from `int` to `Tcl_Size`, a signed integer type
    large enough to support 64-bit sized memory objects.
    The constant `TCL_AUTO_LENGTH` is a value of that type that indicates that
    the length should be obtained using an appropriate function (typically `strlen()` for `char *` values).
  - Ended support for `Tcl_ChannelTypeVersion` less than 5
  - Introduced versioning of the `Tcl_ObjType` struct
  - Removed macros `CONST*`: Tcl 9 support means dropping Tcl 8.3 support.
    (Replaced with standard C `const` keyword going forward.)
  - Removed registration of several `Tcl_ObjType`s.
  - Removed API functions:
     - `Tcl_Backslash()`
     - `Tcl_*VA()`
     - `Tcl_*MathFunc*()`
     - `Tcl_MakeSafe()`
     - `Tcl_(Save|Restore|Discard|Free)Result()`
     - `Tcl_EvalTokens()`
     - `Tcl_(Get|Set)DefaultEncodingDir()`
     - `Tcl_UniCharN(case)cmp()`
     - `Tcl_UniCharCaseMatch()`
  - Revised many internals; beware reliance on undocumented behaviors.

# New Features

## New commands
  - `array default` — Specify default values for arrays (note that this alters the behaviour of `append`, `incr`, `lappend`).
  - `array for` — Cheap iteration over an array's contents.
  - `chan isbinary` — Test if a channel is configured to work with binary data.
  - `coroinject`, `coroprobe` — Interact with paused coroutines.
  - `clock add weekdays` — Clock arithmetic with week days.
  - `const`, `info const*` — Commands for defining constants (variables that can't be modified).
  - `dict getwithdefault` — Define a fallback value to use when `dict get` would otherwise fail.
  - `file home` — Get the user home directory.
  - `file tempdir` — Create a temporary directory.
  - `file tildeexpand` — Expand a file path containing a `~`.
  - `info commandtype` — Introspection for the kinds of commands.
  - `ledit` — Equivalent to `lreplace` but on a list in a variable.
  - `lpop` — Remove an item from a list in a variable.
  - `lremove` — Remove a sublist from a list in a variable.
  - `lseq` — Generate a list of numbers in a sequence.
  - `package files` — Describe the contents of a package.
  - `string insert` — Insert a string as a substring of another string.
  - `string is dict` — Test whether a string is a dictionary.
  - `tcl::process` — Commands for working with subprocesses.
  - `*::build-info` — Obtain information about the build of Tcl.
  - `readFile`, `writeFile`, `foreachLine` — Simple procedures for basic working with files.
  - `tcl::idna::*` — Commands for working with encoded DNS names.

## New command options
  - `chan configure ... -inputmode ...` — Support for raw terminal input and reading passwords.
  - `clock scan ... -validate ...`
  - `info loaded ... ?prefix?`
  - `lsearch ... -stride ...` — Search a list by groups of items.
  - `regsub ... -command ...` — Generate the replacement for a regular expression by calling a command.
  - `socket ... -nodelay ... -keepalive ...`
  - `vwait` controlled by several new options
  - `expr` string comparators `lt`, `gt`, `le`, `ge`
  - `expr` supports comments inside expressions

## Numbers
  - <code>0<i>NNN</i></code> format is no longer octal interpretation. Use <code>0o<i>NNN</i></code>.
  - <code>0d<i>NNNN</i></code> format to compel decimal interpretation.
  - <code>NN_NNN_NNN</code>, underscores in numbers for optional readability
  - Functions: `isinf()`, `isnan()`, `isnormal()`, `issubnormal()`, `isunordered()`
  - Command: `fpclassify`
  - Function `int()` no longer truncates to word size

## TclOO facilities
  - private variables and methods
  - class variables and methods
  - abstract and singleton classes
  - configurable properties
  - `method -export`, `method -unexport`

# Known bugs
  - [changed behaviour wrt command names, namespaces and resolution](https://core.tcl-lang.org/tcl/tktview/f14b33)
  - [windows dos device paths inconsistencies and missing functionality](https://core.tcl-lang.org/tcl/tktview/d8f121)
  - [zlib-8.8, zlib-8.16 fail on Fedora 40, gcc 14.1.1](https://core.tcl-lang.org/tcl/tktview/73d5cb)
  - [Temporary folder with file "tcl9registry13.dll" remains after "exit"](https://core.tcl-lang.org/tcl/tktview/6ce3c0)

For additional information:
===========================

Please visit the Tcl Developer Xchange web site:

> [Tcl Developer Xchange](https://www.tcl-lang.org/)

This site contains a variety of information about Tcl/Tk in general, the
core Tcl and Tk distributions, Tcl development tools, and much more.

--
Tcl Core Team and Maintainers
Don Porter, Tcl Core Release Manager

-- 
| Don Porter            Applied and Computational Mathematics Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

Click on article to view the messages of the thread
ANNOUNCE: Scrolling utilities package Scrollutil 2.3.1
Posted by nemethi <csaba.nemethi@t-online.de> 6 days 9 hours ago
Last contribution 6 days 9 hours ago 0
This is to announce the bugfix version 2.3.1 of the scrolling utilities 
package Scrollutil.

What is new in Scrollutil 2.3.1?
--------------------------------

1. Reverted the implementation of the "scrollutil::getscrollarea"
    command to its version contained in Scrollutil 2.2, thus eliminating
    two potentially critical bugs introduced in Scrollutil 2.3 (thanks to
    Nicolas Bats and Paul Obermeier for their bug reports).

How to get it?
--------------

Scrollutil is available for free download from the Web page

     https://www.nemethi.de

The distribution file is "scrollutil2.3.1.tar.gz" for UNIX and
"scrollutil2_3_1.zip" for Windows.  These files contain the same
information, except for the additional carriage return character
preceding the linefeed at the end of each line in the text files for
Windows.

Scrollutil is also included in tklib, which has the address

     https://core.tcl.tk/tklib

How to install it?
------------------

Install the package as a subdirectory of one of the directories given
by the "auto_path" variable.  For example, you can install it as a
directory at the same level as the Tcl and Tk script libraries.  The
locations of these library directories are given by the "tcl_library"
and "tk_library" variables, respectively.

To install Scrollutil on UNIX, "cd" to the desired directory and unpack
the distribution file "scrollutil2.3.1.tar.gz":

     gunzip -c scrollutil2.3.1.tar.gz | tar -xf -

On most UNIX systems this can be replaced with

     tar -zxf scrollutil2.3.1.tar.gz

Both commands will create a directory named "scrollutil2.3.1", with the
subdirectories "demos", "doc", and "scripts".

On Windows, use WinZip or some other program capable of unpacking the
distribution file "scrollutil2_3_1.zip" into the directory
"scrollutil2.3.1", with the subdirectories "demos", "doc", and
"scripts".

How to use it?
--------------

The Scrollutil distribution provides two packages, called Scrollutil and
Scrollutil_tile.  The main difference between the two is that
Scrollutil_tile enables the tile-based, theme-specific appearance of
scrollarea, scrollsync, and scrollableframe widgets, and provides the
themed scrollednotebook and plainnotebook widgets; this package requires
tile 0.8 or higher.  It is not possible to use both packages in one and
the same application, because both are implemented in the same
"scrollutil" namespace and provide identical commands (except for the
commands "scrollutil::scrollednotebook", "scrollutil::plainnotebook",
"scrollutil::addclosetab", "scrollutil::removeclosetab", and
"scrollutil::closetabstate", which are provided by the Scrollutil_tile
package only).

To be able to use the commands and variables implemented in the package
Scrollutil, your scripts must contain one of the lines

     package require scrollutil ?version?
     package require Scrollutil ?version?

Likewise, to be able to use the commands and variables implemented in
the package Scrollutil_tile, your scripts must contain one of the lines

     package require scrollutil_tile ?version?
     package require Scrollutil_tile ?version?

Since the packages Scrollutil and Scrollutil_tile are implemented in the
"scrollutil" namespace, you must either import the procedures you need,
or use qualified names like "scrollutil::scrollarea".

For a detailed description of the commands and variables provided by
Scrollutil and of the examples contained in the "demos" directory, see
the tutorial "scrollutil.html" and the reference pages, all located in
the "doc" directory.

-- 
Csaba Nemethi  https://www.nemethi.de  mailto:csaba.nemethi@t-online.de

Click on article to view the messages of the thread
Tcl/Tk 9.0.0 Release Candidates
Posted by Don Porter <donald.porter@nist.gov> 1 week ago
Last contribution 1 week ago 1
Replies:
  • Gerald Lester <Gerald.Lester@gmail.com> replied 1 week ago
Now available at

https://sourceforge.net/projects/tcl/files/Tcl/9.0.0/

are RC2 candidate source code distribution pre-releases of Tcl and Tk 9.0.0

Testing of builds and operations on multiple platforms is invited.
Report any critical problems that should block release immediately.

The Tcl pre-release includes pre-releases of the packages Thread 3.0.0
and Itcl 4.3.1.  The same level of vetting on them is also appreciated.
The released packages sqlite 3.45.3 and TDBC* 1.1.9 are also included.

Thank you for your contributions and assistance.

-- 
| Don Porter            Applied and Computational Mathematics Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

Click on article to view the messages of the thread
Show argument values in bgerror
Posted by alexandru.dadalau@meshparts.de (alexandru) 2 weeks ago
Last contribution 1 week 1 day ago 10
Replies:
  • r.zaumseil@freenet.de (rene) replied 1 week 1 day ago
  • alexandru.dadalau@meshparts.de (alexandru) replied 1 week 5 days ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 weeks ago
  • Don Porter <donald.porter@nist.gov> replied 2 weeks ago
  • alexandru.dadalau@meshparts.de (alexandru) replied 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 weeks ago
  • alexandru.dadalau@meshparts.de (alexandru) replied 2 weeks ago
  • alexandru.dadalau@meshparts.de (alexandru) replied 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 weeks ago
  • et99 <et99@rocketship1.me> replied 2 weeks ago
I have this ::bgerror function to help debug errors in program flow:

proc ::bgerror {message} {
  global errorInfo
  puts "*** START OF ERROR MESSAGE ***\n$message\n$errorInfo\n*** END OF
ERROR MESSAGE ***"
}

The issue is, that the errorInfo does not show the values of the
arguments of called procedures in the stack.
Thus it's often not clear which arguments lead the the error.
Is there a trick how to show the values with which the procedures were
called in the stack prior to the error?

Many thanks
Alexandru

Click on article to view the messages of the thread
What value can cause this error?
Posted by alexandru.dadalau@meshparts.de (alexandru) 2 weeks ago
Last contribution 1 week 5 days ago 6
Replies:
  • alexandru.dadalau@meshparts.de (alexandru) replied 1 week 5 days ago
  • Christian Gollwitzer <auriocus@gmx.de> replied 2 weeks ago
  • alexandru.dadalau@meshparts.de (alexandru) replied 2 weeks ago
  • Rich <rich@example.invalid> replied 2 weeks ago
  • alexandru.dadalau@meshparts.de (alexandru) replied 2 weeks ago
  • Rich <rich@example.invalid> replied 2 weeks ago
I got this error message from a customer and no further information is
available.
What could have caused this error?

integer value too large to represent
    while executing
"expr {round($val*(10.0**($decimals+3)))/(10.0**$decimals)}"

I know that "val" is a proper number and that "decimals" is 6.

I tried to run this expression with very high "val" values and could not
reproduce the error.

Many thanks
Alexandru

Click on article to view the messages of the thread
ANNOUNCE: windetect 2.0.0
Posted by elns <look@the.footer.invalid> 2 weeks 1 day ago
Last contribution 2 weeks ago 5
Replies:
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 weeks ago
  • elns <look@the.footer.invalid> replied 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 weeks ago
  • elns <look@the.footer.invalid> replied 2 weeks 1 day ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 weeks 1 day ago
The package windetect 2.0.0 is available.


Summary of changes since the previous version (1.0.0)
=====================================================

a. New command "instrument", facilitating custom GUI sensitization.
b. Removal of the implicit default instrumentation. This introduces an

        *** INCOMPATIBILITY ***

    with previous releases. GUI instrumentation is left to the user as an
    explicit programming step, using the new "instrument" command.
c. New option -wsrespite to the command windetect::configure
d. Several bug fixes related to destruction of the pointer window and
    window grabs.
e. Support for Tcl/Tk 9.0
f. Vastly improved testing, in several respects.
g. Substantial documentation enhancements.

For a detailed list of changes, see the file "changes" inside the
distribution.


About
=====
Windetect is a Tk library that provides the basic detection functionality
for tracking windows in a GUI.

Windetect supports the X11 and win32 windowing systems, routinely tested on
Linux and MS Windows respectively. Although it's possible that windetect
runs fine on other systems, no claims are made about that.

The package is hosted by the project tkwintrack at SourceForge:

     https://sourceforge.net/projects/tkwintrack/

- Documentation is included in the distribution.
- License: Apache 2.0
- Bug reports are welcomed at the issue tracker at SourceForge.


Erik Leunissen
-- 
elns@       nl | Merge the left part of these two lines into one,
      xs4all.   | respecting a character's position in a line.

Click on article to view the messages of the thread
ANNOUNCE: tkwintrack 2.1.0
Posted by elns <look@the.footer.invalid> 2 weeks 1 day ago
Last contribution 2 weeks 1 day ago 0
The package tkwintrack 2.1.0 is available.


Summary of changes since the previous version (2.0.1)
=====================================================

a. Support for Tcl/Tk 9.0
b. Require windetect version 2.0
c. A few enhancements of the configuration dialog.
d. Several bug fixes related to destruction of the pointer window, destruction
    of the outline widget, and to window grabs.
e. Vastly improved testing, in several respects.
f. Documentation updates and enhancements.

For a detailed list of changes, see the file "changes" inside the
distribution.


About
=====
Tkwintrack is an inspection tool for developers of Tk GUI's. While tracking
individual windows in a GUI with the mouse pointer, tkwintrack outlines them
and displays their pathname in a small widget. Window pathnames reported in
this pathname widget may be copied to the clipboard.

Tkwintrack supports the X11 and win32 windowing systems, routinely tested on
Linux and MS Windows respectively. Although it's possible that windetect
runs fine on other systems, no claims are made about that.

The package is hosted by the project tkwintrack at SourceForge:

     https://sourceforge.net/projects/tkwintrack/

- Documentation is included in the distributions
- License: Apache 2.0
- Bug reports and RFE's are welcome at the issue tracker at SourceForge


Erik Leunissen
-- 
elns@       nl | Merge the left part of these two lines into one,
      xs4all.   | respecting a character's position in a line.

Click on article to view the messages of the thread
Tcl / Tk 8.6.15 RELEASED
Posted by Don Porter <donald.porter@nist.gov> 2 weeks 2 days ago
Last contribution 2 weeks 2 days ago 1
Replies:
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 weeks 2 days ago
Tcl/Tk 8.6.15 Release Announcement
September 13, 2024

The Tcl Core Team is pleased to announce the 8.6.15 releases of the Tcl
dynamic language and the Tk toolkit.  This is the fifteenth patch release
of Tcl/Tk 8.6.  More details can be found below.

We would like to express our gratitude to all those who submit bug
reports and patches.  This information is invaluable in enabling us
to identify and eliminate problems in the core. Such reports can be
submitted here.

         https://core.tcl-lang.org/tcl/ticket
         https://core.tcl-lang.org/tk/ticket

We ask that you log in (anonymous if you wish) to create tickets.
This deters abuse of the ticketing system:

         https://core.tcl-lang.org/tcl/login
         https://core.tcl-lang.org/tcl/login

Where to get the new releases:
------------------------------

Tcl/Tk 8.6.15 sources are freely available as open source from the Tcl
SourceForge project's file distribution area:

         http://sourceforge.net/projects/tcl/files/

This distribution is source code only.  We keep links to some third
parties offering pre-built binaries for various systems here:

         http://www.tcl-lang.org/software/tcltk/bindist.html

For additional information:
---------------------------

Please visit the Tcl Developer Xchange web site:

         http://www.tcl-lang.org/

This site contains a variety of information about Tcl/Tk in general, the
core Tcl and Tk distributions, Tcl development tools, and much more.

Summary of Changes since Tcl/Tk 8.6.14:
--------------------------------------

This is a patch release, so it primarily includes bug fixes and corrections
to erratic behavior.  Highlighted changes are noted below.  The changes file
at the root of the source tree contains a more complete list.  The Timelines
of all changes are online.

	http://core.tcl-lang.org/tcl/timeline
	http://core.tcl-lang.org/tk/timeline

    * [TIP 692] Deprecate Tcl_GetAlias(). Migrate to Tcl_GetAliasObj()

    * Invoke binding scripts for events with detail field NotifyInferior
         *** POTENTIAL INCOMPATIBILITY ***

    * Tcl_NewObjectInstance() errors on namespace re-use.
         *** POTENTIAL INCOMPATIBILITY -- breaks Itcl 4.2 ***

    * TCL_PACKAGE_PATH change from Tcl list to platform path convention
         *** POTENTIAL INCOMPATIBILITY ***

    * Make [self] work inside [$obj eval]

    * Fix [$obj varname] for linked varnames

    * Restore access to alternate data streams (ADS) in NTFS filesystems.

    * Fix crashes or hangs in...
       - TclOO + coroutine, oo-22.[34]
       - entangled destructor and namespace deletion, oo-35.7.*
       - destruction of reflected channel, iocmd-32.3.*
       - select notifier with file descriptor >= FD_SETSIZE
       - [child invokehidden info frame], info-40.0
       - [focus -force], focus-8.1
       - [$canvas dchars], canvas-11.4
       - [$menubutton destroy]

    * Appearance improvements for...
       - focus ring, arrows, and classic theme.
       - last item in a [ttk::treeview].
       - down arrow in [ttk::combobox].

    * Repair [$photo read -from] flaws in GIF,PNG formats. imgPhoto-19.*

    * [$photo copy] coordinate check error. See imgPhoto-12.5

    * Detect corrupt GIF file and raise error. See imgPhoto-18.6.1

    * Fixes to [ttk::treeview] subcommands 'see' and 'bbox'.

    * Fix default font detection for high DPI

    * [treeview identify] now point aware

    * Fix broken undo/redo in [text] widget.

    * Fix GENFUNC mode of Tcl_ParseArgsObjv(). See tests indexObj-7.*

    * Fix removal of oo variable by [info exists]. See oo-19.4

    * Fix byte compiled [incr] with wide int increment. See incr-1.31

    * Repair encoding flaws in [info hostname] visible for non-ASCII names.

    * Fix incorrect [string is control] results on some private codepoints

    * Autoload of [::tcl::tm::path]

    * Fix missing error message in some [interp limit] failures.

    * Improved hash performance for some hash tables.

    * Performance optimizations in several encoding primitives.

    * Correction to rare failed startup search for system encoding

    * Add encodings: koi8-ru, koi8-t

    * Add keycodes ISO_Group_Shift and dead_hamza

    * Updated bundled packages, libraries, standards, data
       - Itcl 4.3.0 -- supports multi-thread operations
       - sqlite3 3.45.3
       - Thread 2.8.10
       - TDBC* 1.1.9
       - tcltest 2.5.8
       - libtommath 1.3.0
       - Unicode 16
       - tzdata 2024b

--
Tcl Core Team and Maintainers
Don Porter, Tcl Core Release Manager

-- 
| Don Porter            Applied and Computational Mathematics Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

Click on article to view the messages of the thread
ISO a way to select programmatically an entry from a popup
Posted by Helmut Giese <hgiese@ratiosoft.com> 2 weeks 5 days ago
Last contribution 2 weeks 2 days ago 6
Replies:
  • Helmut Giese <hgiese@ratiosoft.com> replied 2 weeks 2 days ago
  • greg <gregor.ebbing@gmx.de> replied 2 weeks 3 days ago
  • greg <gregor.ebbing@gmx.de> replied 2 weeks 3 days ago
  • greg <gregor.ebbing@gmx.de> replied 2 weeks 4 days ago
  • greg <gregor.ebbing@gmx.de> replied 2 weeks 4 days ago
  • greg <gregor.ebbing@gmx.de> replied 2 weeks 4 days ago
Hello out there,
it seems like as long as a popup is posted the app cannot do anything
- in particular it cannot post any events. Consider this script:
	---
package require Tk
foreach ch [winfo children "."] {destroy $ch}

# Turn $x & $y into absolute coords
proc mkAbsCoords {c x y} {
    # get the canvas's coord relative to the toplevel
    set xOfs [expr {[winfo rootx $c]}]
    set yOfs [expr {[winfo rooty $c]}]
    return [list [expr {$x + $xOfs}] [expr {$y + $yOfs}]]
}

proc popupMenu {c x y} {
    catch {destroy .popup}
    set popup [menu .popup -tearoff false]
    set inactiveBG #b2b2b2
    $popup add command -label "Choose an op" \
        -background  #b2b2b2 -activebackground  #b2b2b2 \
        -activeforeground [$popup cget -fg]
    $popup add command -label "Op 1" -command {puts "Op1 selected"}
    $popup add command -label "Op 2" -command {puts "Op2 selected"}
    lassign [mkAbsCoords $c $x $y] x y
    tk_popup $popup $x $y
}

set num [lindex $argv 0]
set c [canvas .c -width 200 -height 200]
pack $c
set id [$c create rectangle 50 50 150 150 -fill lightyellow]
$c bind $id <Button-3> [list popupMenu $c %x %y]
update
if {$num} {
    set event Button
} else {
    set event ButtonPress
}
event generate $c <$event> -button 3 -x 100 -y 100 -warp 1
puts "Back from '$event'"
if {$num == 0} {
    event generate $c <ButtonRelease> -button 3 -x 100 -y 100 -warp 1
    puts "Back from 'ButtonRelease'"
}
	---
and this output:
	---
Microsoft Windows [Version 10.0.19045.4894]
(c) Microsoft Corporation. Alle Rechte vorbehalten.

d:\proj\_ToolsSE\Skeleton\TclTests>tclsh tst.tcl 1
Back from 'Button'
Op1 selected

d:\proj\_ToolsSE\Skeleton\TclTests>tclsh tst.tcl 0
Back from 'ButtonPress'
Back from 'ButtonRelease'
Op1 selected
	---
To me this seems to clearly indicate that the selection cannot be
influenced by the controlling app: control only returns when the
selection has happened - which is too bad.

Or is there a trick by which one can influence the selection from a
popup?
Any idea will be highly appreciated.
Helmut
Oh, this is on Windows 64 bit under Tcl 8.6.10

Click on article to view the messages of the thread
Tcl/Tk 8.6.15 Release Candidates
Posted by Don Porter <donald.porter@nist.gov> 2 weeks 5 days ago
Last contribution 2 weeks 4 days ago 1
Replies:
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 weeks 4 days ago
Now available at

https://sourceforge.net/projects/tcl/files/Tcl/8.6.15/

are RC2 candidate source code distribution pre-releases of Tcl and Tk 8.6.15.

This should be the final candidate releases leading to the release of Tcl/Tk 8.6.15.
Unless some serious blocking issue is reported, these files will become the release
upon announcement.

The Tcl pre-release includes pre-releases of the packages Thread 2.8.10, Itcl 4.3.0,
and TDBC* 1.1.9.  The released package sqlite3 3.45.3 is also included.

Thank you for your contributions and assistance.

-- 
| Don Porter            Applied and Computational Mathematics Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

Click on article to view the messages of the thread
tcllib1.21 and tcl9.0b3
Posted by Alan Grunwald <nospam.nurdglaw@gmail.com> 2 weeks 4 days ago
Last contribution 2 weeks 4 days ago 5
Replies:
  • Paul Obermeier <obermeier@poSoft.de> replied 2 weeks 4 days ago
  • Alan Grunwald <nospam.nurdglaw@gmail.com> replied 2 weeks 4 days ago
  • Alan Grunwald <nospam.nurdglaw@gmail.com> replied 2 weeks 4 days ago
  • Paul Obermeier <obermeier@poSoft.de> replied 2 weeks 4 days ago
  • Alan Grunwald <nospam.nurdglaw@gmail.com> replied 2 weeks 4 days ago
How compatible is tcllib 1.21 with tcl9.0b3?

I've built tcl-9.0b3 and want to see how it plays with my scripts. (OK, 
more properly that should be "how my scripts play with tcl 9.0b3.)

I'm testing with a script that includes [package require uri].

This fails, saying it can't find the package.

I've dug around a bit and I see that the pkgIndex.tcl in tcllib-1.21 
starts with a fast return if

[package vsatisfies [package provide Tcl] 8]

returns 0.

I've changed that to

[package vsatisfies [package provide Tcl] 8 9]

and it now gets a couple of lines further down the script where it 
encounters

if {(0 == [catch {
     package vcompare [info patchlevel] [info patchlevel]
}]) && (
     [package vcompare [info patchlevel] 8.3.1] >= 0
)} {return}

and returns.

I don't understand this line well enough to change it. As far as I can 
make out,

     package vcompare [info patchlevel] [info patchlevel]

will always return 0 and won't throw an exception, so this should always 
result in a premature return, before all the

package ifneeded

commands for the packages withing tcllib are executed.

However, that argument applies equally to tcl8.6.14, but the same 
pkgIndex.tcl works just fine on my home-built copy of that.

It's getting late and I'll have another look tomorrow and see if I can 
work out what's happening. In the mean time, I'd very much appreciate 
any help you can provide.

Click on article to view the messages of the thread
Why do we need "eval"? (Expect question)
Posted by gazelle@shell.xmission.com (Kenny McCormack) 2 weeks 6 days ago
Last contribution 2 weeks 5 days ago 10
Replies:
  • Rich <rich@example.invalid> replied 2 weeks 5 days ago
  • gazelle@shell.xmission.com (Kenny McCormack) replied 2 weeks 5 days ago
  • gazelle@shell.xmission.com (Kenny McCormack) replied 2 weeks 5 days ago
  • gazelle@shell.xmission.com (Kenny McCormack) replied 2 weeks 5 days ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 weeks 5 days ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 weeks 5 days ago
  • Rich <rich@example.invalid> replied 2 weeks 5 days ago
  • Rich <rich@example.invalid> replied 2 weeks 5 days ago
  • gazelle@shell.xmission.com (Kenny McCormack) replied 2 weeks 6 days ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 weeks 6 days ago
Consider this (Unix/Linux/bash) command line:

$ expect -- /dev/fd/3 3<<< 'eval spawn -noecho printf {{\t%s\n}} $argv;interact' $(seq 1 10)

This correctly generates the output (each line starts with a tab):

	1
	2
	3
	4
	5
	6
	7
	8
	9
	10

But notice how we have to use "eval" in order to split up the args in $argv.
And, since we are using "eval", we have to "double quote" (with {}) the
"format" arg to "printf".  It'd be nice if neither of these things were
necessary.

I've always believed that "eval" was "evil" and to be avoided if at all
possible - both in shell and in Tcl.  It has strange side effects, such as
we see here (the need to "double quote").  Is there any way to get the
above effect w/o using "eval" ?

-- 
"Every time Mitt opens his mouth, a swing state gets its wings."

(Should be on a bumper sticker)

Click on article to view the messages of the thread
Questions regarding the "unbuffer" program (Expect)
Posted by gazelle@shell.xmission.com (Kenny McCormack) 2 weeks 6 days ago
Last contribution 2 weeks 6 days ago 0
/usr/bin/unbuffer has some constructs I'm not familiar with.  Observe:

1)  set stty_init "-echo"

What does this do?  "stty_init" isn't used anywhere else.  Is it some kind of
magic built-in variable?

2)  eval [list spawn -noecho] [lrange $argv 1 end]

Why use [list] here?  Whenever I've needed to do this, I just do:

    eval spawn -noecho [lrange $argv 1 end]

3)  close_on_eof -i $user_spawn_id 0

What is "close_on_eof"?  I've never heard of it and can't find it any of
the docs I checked.

-- 
The coronavirus is the first thing, in his 74 pathetic years of existence,
that the orange menace has come into contact with, that he couldn't browbeat,
bully, bullshit, bribe, sue, legally harrass, get Daddy to fix, get his
siblings to bail him out of, or, if all else fails, simply wish it away.

Click on article to view the messages of the thread
tcl versa python regarding performance
Posted by aotto1968 <aotto1968@t-online.de> 1 month 2 weeks ago
Last contribution 2 weeks 6 days ago 43
Replies:
  • aotto1968 <aotto1968@t-online.de> replied 2 weeks 6 days ago
  • aotto1968 <aotto1968@t-online.de> replied 2 weeks 6 days ago
  • aotto1968 <aotto1968@t-online.de> replied 3 weeks ago
  • undroidwish <undroidwish@googlemail.com> replied 3 weeks 2 days ago
  • aotto1968 <aotto1968@t-online.de> replied 3 weeks 2 days ago
  • undroidwish <undroidwish@googlemail.com> replied 3 weeks 2 days ago
  • aotto1968 <aotto1968@t-online.de> replied 3 weeks 2 days ago
  • undroidwish <undroidwish@googlemail.com> replied 3 weeks 2 days ago
  • aotto1968 <aotto1968@t-online.de> replied 3 weeks 2 days ago
  • aotto1968 <aotto1968@t-online.de> replied 3 weeks 2 days ago
  • Christian Gollwitzer <auriocus@gmx.de> replied 3 weeks 3 days ago
  • Gerald Lester <Gerald.Lester@gmail.com> replied 3 weeks 3 days ago
  • undroidwish <undroidwish@googlemail.com> replied 3 weeks 3 days ago
  • aotto1968 <aotto1968@t-online.de> replied 3 weeks 4 days ago
  • aotto1968 <aotto1968@t-online.de> replied 3 weeks 5 days ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 1 week ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 1 week ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • et99 <et99@rocketship1.me> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • undroidwish <undroidwish@googlemail.com> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • undroidwish <undroidwish@googlemail.com> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • saito <saitology9@gmail.com> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • undroidwish <undroidwish@googlemail.com> replied 1 month 2 weeks ago
  • Christian Gollwitzer <auriocus@gmx.de> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • saito <saitology9@gmail.com> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • Gerald Lester <Gerald.Lester@gmail.com> replied 1 month 2 weeks ago
  • Alan Grunwald <nospam.nurdglaw@gmail.com> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • Gerald Lester <Gerald.Lester@gmail.com> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • aotto1968 <aotto1968@t-online.de> replied 1 month 2 weeks ago
  • undroidwish <undroidwish@googlemail.com> replied 1 month 2 weeks ago
Hi, some (unproven) statistics from my SW regarding the performance TCL versa PYTHON

The --send ... send packages
The --parent/child ... measure startup time
The other ... build data structures

Tcl is except --parent (startup) slower than python → I think the CORE problem is the OO implementation in TCL

→ the basic technology for TCL and PYTHON is a OO wrapper around the C-library this mean the BASIC workload
   for TCL & PYTHON is the same and the TIME difference is just the TCL/PYTHON overload

TCL
===

setup=release
   > feature=tcl_pipe
     > .../release/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2  --all @ $TCLSH 
..../release/inst/sbin/x86_64-suse-linux-gnu-perfserver-tcl.tcl
       :PerfClientExec                }: start ------------------------ :     result [    count / sec        ]
       :statistics                    }:                         --send :   216004.5 [   432206 / 2.000912   ]
       :statistics                    }:                  --send-string :   224700.4 [   449614 / 2.000949   ]
       :statistics                    }:            --send-and-callback :   121014.5 [   242218 / 2.001561   ]
       :statistics                    }:                --send-and-wait :    58694.0 [   117389 / 2.000015   ]
       :statistics                    }:              --send-persistent :    13358.7 [    26718 / 2.000046   ]
       :statistics                    }:                       --parent :       82.5 [      165 / 2.000311   ]
       :statistics                    }:                        --child :    21321.3 [    42643 / 2.000022   ]
       :statistics                    }:                          --bus :    40133.7 [    80268 / 2.000017   ]
       :statistics                    }:                          --bfl :    41333.4 [    82667 / 2.000005   ]
       :statistics                    }:                          --bin :   264818.7 [   529687 / 2.000187   ]
       :statistics                    }:                          --str :   265383.5 [   530867 / 2.000377   ]
       :PerfClientExec                }: end: ----------------------------------------

PYTHON
======

setup=release
   > feature=py_pipe
     > .../release/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2  --all @ $PYTHON 
..../release/inst/sbin/x86_64-suse-linux-gnu-perfserver-py.py
       :PerfClientExec                }: start ------------------------ :     result [    count / sec        ]
       :statistics                    }:                         --send :   292415.7 [   584872 / 2.000139   ]
       :statistics                    }:                  --send-string :   294627.4 [   589494 / 2.000812   ]
       :statistics                    }:            --send-and-callback :   154291.6 [   308617 / 2.000219   ]
       :statistics                    }:                --send-and-wait :    73577.8 [   147156 / 2.000005   ]
       :statistics                    }:              --send-persistent :    13796.6 [    27594 / 2.000058   ]
       :statistics                    }:                       --parent :       71.0 [      142 / 2.000464   ]
       :statistics                    }:                        --child :    21959.2 [    43919 / 2.000024   ]
       :statistics                    }:                          --bus :    67991.3 [   135983 / 2.000005   ]
       :statistics                    }:                          --bfl :    65537.4 [   131075 / 2.000004   ]
       :statistics                    }:                          --bin :   326737.6 [   653632 / 2.000480   ]
       :statistics                    }:                          --str :   327746.7 [   655625 / 2.000402   ]
       :PerfClientExec                }: end: ----------------------------------------


This is the reference in C only
===============================

setup=release
   > feature=c_pipe
     > .../release/inst/sbin/x86_64-suse-linux-gnu-perfclient --timeout 2  --all @ 
..../release/inst/sbin/x86_64-suse-linux-gnu-perfserver-c
       :PerfClientExec                }: start ------------------------ :     result [    count / sec        ]
       :statistics                    }:                         --send :   372049.5 [   744214 / 2.000309   ]
       :statistics                    }:                  --send-string :   388248.2 [   776648 / 2.000390   ]
       :statistics                    }:            --send-and-callback :   221224.1 [   442541 / 2.000420   ]
       :statistics                    }:                --send-and-wait :    87320.3 [   174641 / 2.000004   ]
       :statistics                    }:              --send-persistent :    15245.3 [    30491 / 2.000024   ]
       :statistics                    }:                       --parent :      552.4 [     1105 / 2.000235   ]
       :statistics                    }:                        --child :    35888.9 [    71778 / 2.000004   ]
       :statistics                    }:                          --bus :    80124.6 [   160250 / 2.000011   ]
       :statistics                    }:                          --bfl :    86655.9 [   173312 / 2.000003   ]
       :statistics                    }:                          --bin :   400718.2 [   801590 / 2.000383   ]
       :statistics                    }:                          --str :   396122.8 [   792369 / 2.000312   ]
       :PerfClientExec                }: end: ----------------------------------------

Click on article to view the messages of the thread
September 10 2024 Tcl monthly virtual meetup notice
Posted by steve@digitalsmarties.com (stevel) 3 weeks 2 days ago
Last contribution 3 weeks 2 days ago 0
A reminder that the September Tcl virtual meetup will be held Tuesday
September 10th 2024 at [clock format 1725962400] - Tuesday 3am US West,
5am US Central, 6am US East, 10am UTC, 11am UK, 12pm Western Europe,
3:30pm India, 6pm Australia West / Singapore / China, 7pm Japan, 8pm
Australia East, 10pm New Zealand

Details (including how to connect) are available via
https://wiki.tcl-lang.org/page/Monthly+Virtual+Meetup

-- Steve

Click on article to view the messages of the thread
ANNOUNCE: Scrolling utilities package Scrollutil 2.3
Posted by nemethi <csaba.nemethi@t-online.de> 4 weeks ago
Last contribution 3 weeks 5 days ago 1
Replies:
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 3 weeks 5 days ago
I am pleased to announce version 2.3 of the scrolling utilities package
Scrollutil.

What is new in Scrollutil 2.3?
------------------------------

1. Several improvements in the implementation of the scrollarea widget.
    For example, made sure that mapping or unmapping the horizontal
    scrollbar as a result of resizing the toplevel window no longer
    causes the toplevel to get higher.

2. Made sure that the handling of the <TouchpadScroll> event won't
    pollute the global namespace (thanks to Rolf Ade for drawing my
    attention to this issue).

3. Added the demo script ScrolledCanvas.tcl; improvements in several
    other demo scripts.

4. Fixed a bug that under some circumstances caused the dynamic
    horizontal scrollbar of a newly created scrollarea widget to get
    mapped for a short time, even though the embedded widget's "xview"
    command returned the list {0 1}.

5. Restored the support for Tcl/Tk 8.4, which was broken due to the use
    of package version numbers with a trailing "-" (thanks to Samuel
    Brown for his bug report).

How to get it?
--------------

Scrollutil is available for free download from the Web page

     https://www.nemethi.de

The distribution file is "scrollutil2.3.tar.gz" for UNIX and
"scrollutil2_3.zip" for Windows.  These files contain the same
information, except for the additional carriage return character
preceding the linefeed at the end of each line in the text files for
Windows.

Scrollutil is also included in tklib, which has the address

     https://core.tcl.tk/tklib

How to install it?
------------------

Install the package as a subdirectory of one of the directories given
by the "auto_path" variable.  For example, you can install it as a
directory at the same level as the Tcl and Tk script libraries.  The
locations of these library directories are given by the "tcl_library"
and "tk_library" variables, respectively.

To install Scrollutil on UNIX, "cd" to the desired directory and unpack
the distribution file "scrollutil2.3.tar.gz":

     gunzip -c scrollutil2.3.tar.gz | tar -xf -

On most UNIX systems this can be replaced with

     tar -zxf scrollutil2.3.tar.gz

Both commands will create a directory named "scrollutil2.3", with the
subdirectories "demos", "doc", and "scripts".

On Windows, use WinZip or some other program capable of unpacking the
distribution file "scrollutil2_3.zip" into the directory
"scrollutil2.3", with the subdirectories "demos", "doc", and "scripts".

How to use it?
--------------

The Scrollutil distribution provides two packages, called Scrollutil and
Scrollutil_tile.  The main difference between the two is that
Scrollutil_tile enables the tile-based, theme-specific appearance of
scrollarea, scrollsync, and scrollableframe widgets, and provides the
themed scrollednotebook and plainnotebook widgets; this package requires
tile 0.8 or higher.  It is not possible to use both packages in one and
the same application, because both are implemented in the same
"scrollutil" namespace and provide identical commands (except for the
commands "scrollutil::scrollednotebook", "scrollutil::plainnotebook",
"scrollutil::addclosetab", "scrollutil::removeclosetab", and
"scrollutil::closetabstate", which are provided by the Scrollutil_tile
package only).

To be able to use the commands and variables implemented in the package
Scrollutil, your scripts must contain one of the lines

     package require scrollutil ?version?
     package require Scrollutil ?version?

Likewise, to be able to use the commands and variables implemented in
the package Scrollutil_tile, your scripts must contain one of the lines

     package require scrollutil_tile ?version?
     package require Scrollutil_tile ?version?

Since the packages Scrollutil and Scrollutil_tile are implemented in the
"scrollutil" namespace, you must either import the procedures you need,
or use qualified names like "scrollutil::scrollarea".

For a detailed description of the commands and variables provided by
Scrollutil and of the examples contained in the "demos" directory, see
the tutorial "scrollutil.html" and the reference pages, all located in
the "doc" directory.

-- 
Csaba Nemethi  https://www.nemethi.de  mailto:csaba.nemethi@t-online.de

Click on article to view the messages of the thread
ANNOUNCE: Multi-column listbox and tree widget package Tablelist 7.3
Posted by nemethi <csaba.nemethi@t-online.de> 4 weeks ago
Last contribution 4 weeks ago 0
I am pleased to announce version 7.3 of the multi-column listbox and
tree widget package Tablelist.

What is new in Tablelist 7.3?
-----------------------------

1. Added the virtual events <<TablelistXViewChanged>> and
    <<TablelistYViewChanged>>, generated when the horizontal/vertical
    view in the tablelist widget's window changes.

2. Significantly improved the performance of "cellconfigure ... -text"
    (thanks to Paul Obermeier for his valuable contribution).

3. Guarded against the case that an embedded image was deleted (thanks
    to Paul Obermeier for his proposal).

4. Made sure that the handling of the <TouchpadScroll> event won't
    pollute the global namespace (thanks to Rolf Ade for drawing my
    attention to this issue).

5. Adapted the handling of the <FocusIn> and <FocusOut> events to recent
    changes made in Tk related to these events and the detail field
    "NotifyInferior".

6. Restored the support for Tcl/Tk 8.4, which was broken due to the use
    of package version numbers with a trailing "-" and of a submodifier
    in text widget indices (thanks to Samuel Brown for his bug report).

7. Fixed a long-standing bug related to the optimization of item
    insertion.


How to get it?
--------------

Tablelist is available for free download from the URL

     https://www.nemethi.de

The distribution file is "tablelist7.3.tar.gz" for UNIX and
"tablelist7_3.zip" for Windows.  These files contain the same
information, except for the additional carriage return character
preceding the linefeed at the end of each line in the text files for
Windows.

Tablelist is also included in tklib, which has the address

     https://core.tcl.tk/tklib

How to install it?
------------------

Install the package as a subdirectory of one of the directories given
by the "auto_path" variable.  For example, you can install it as a
directory at the same level as the Tcl and Tk script libraries.  The
locations of these library directories are given by the "tcl_library"
and "tk_library" variables, respectively.

To install Tablelist on UNIX, "cd" to the desired directory and unpack
the distribution file "tablelist7.3.tar.gz":

     gunzip -c tablelist7.3.tar.gz | tar -xf -

On most UNIX systems this can be replaced with

     tar -zxf tablelist7.3.tar.gz

Both commands will create a directory named "tablelist7.3 with the
subdirectories "demos", "doc", and "scripts".

On Windows, use WinZip or some other program capable of unpacking the
distribution file "tablelist7_3.zip" into the directory
"tablelist7.3", with the subdirectories "demos", "doc", and "scripts".

How to use it?
--------------

The Tablelist distribution provides two packages, called Tablelist and
Tablelist_tile.  The main difference between the two is that
Tablelist_tile enables the tile-based, theme-specific appearance of
tablelist widgets; this package requires tile 0.6 or higher.  It is not
possible to use both packages in one and the same application, because
both are implemented in the same "tablelist" namespace and provide
identical commands.

To be able to use the commands and variables implemented in the package
Tablelist, your scripts must contain one of the lines

     package require tablelist ?version?
     package require Tablelist ?version?

Likewise, to be able to use the commands and variables implemented in
the package Tablelist_tile, your scripts must contain one of the lines

     package require tablelist_tile ?version?
     package require Tablelist_tile ?version?

Since the packages Tablelist and Tablelist_tile are implemented in the
"tablelist" namespace, you must either import the procedures you need,
or use qualified names like "tablelist::tablelist".

For a detailed description of the commands and variables provided by
Tablelist and of the examples contained in the "demos" directory, see
the tutorial "tablelist.html" and the reference pages, all located in
the "doc" directory.

-- 
Csaba Nemethi  https://www.nemethi.de  mailto:csaba.nemethi@t-online.de

Click on article to view the messages of the thread
ANNOUNCE: Multi-entry widget package Mentry 4.3
Posted by nemethi <csaba.nemethi@t-online.de> 4 weeks ago
Last contribution 4 weeks ago 0
I am pleased to announce version 4.3 of the multi-entry widget package
Mentry.

What is new in Mentry 4.3?
--------------------------

1. Made sure that the handling of the <TouchpadScroll> event won't
    pollute the global namespace (thanks to Rolf Ade for drawing my
    attention to this issue).

2. Loading the package no longer sets a global variable (thanks to
    Emiliano Gavilan for reporting this issue).

3. The "put" subcommand no longer moves the focus temporarily from the
    mentry widget to the containing toplevel window (thanks to Emiliano
    Gavilan for his bug report).

4. Restored the support for Tcl/Tk 8.4, which was broken due to the use
    of package version numbers with a trailing "-" (thanks to Samuel
    Brown for his bug report).

How to get it?
--------------

Mentry is available for free download from the Web page

     https://www.nemethi.de

The distribution file is "mentry4.3.tar.gz" for UNIX and "mentry4_3.zip"
for Windows.  These files contain the same information, except for the
additional carriage return character preceding the linefeed at the end
of each line in the text files for Windows.

Mentry is also included in tklib, which has the address

     https://core.tcl.tk/tklib

How to install it?
------------------

Install the package as a subdirectory of one of the directories given
by the "auto_path" variable.  For example, you can install it as a
directory at the same level as the Tcl and Tk script libraries.  The
locations of these library directories are given by the "tcl_library"
and "tk_library" variables, respectively.

To install Mentry on UNIX, "cd" to the desired directory and unpack the
distribution file "mentry4.3.tar.gz":

     gunzip -c mentry4.3.tar.gz | tar -xf -

On most UNIX systems this can be replaced with

     tar -zxf mentry4.3.tar.gz

Both commands will create a directory named "mentry4.3", with the
subdirectories "demos", "doc", and "scripts".

On Windows, use WinZip or some other program capable of unpacking the
distribution file "mentry4_3.zip" into the directory "mentry4.3", with
the subdirectories "demos", "doc", and "scripts".

How to use it?
--------------

The Mentry distribution provides two packages, called Mentry and
Mentry_tile.  The main difference between the two is that Mentry_tile
enables the tile-based, theme-specific appearance of mentry widgets;
this package requires tile 0.6 or higher.  It is not possible to use
both packages in one and the same application, because both are
implemented in the same "mentry" namespace and provide identical
commands.

To be able to use the commands and variables implemented in the package
Mentry, your scripts must contain one of the lines

     package require mentry ?version?
     package require Mentry ?version?

Likewise, to be able to use the commands and variables implemented in
the package Mentry_tile, your scripts must contain one of the lines

     package require mentry_tile ?version?
     package require Mentry_tile ?version?

Since the packages Mentry and Mentry_tile are implemented in the
"mentry" namespace, you must either import the procedures you need, or
use qualified names like "mentry::mentry".

For a detailed description of the commands and variables provided by
Mentry and of the examples contained in the "demos" directory, see the
tutorial "mentry.html" and the reference pages, all located in the
"doc" directory.

-- 
Csaba Nemethi  https://www.nemethi.de  mailto:csaba.nemethi@t-online.de

Click on article to view the messages of the thread
ANNOUNCE: Widget callback package Wcb 4.1
Posted by nemethi <csaba.nemethi@t-online.de> 4 weeks ago
Last contribution 4 weeks ago 0
I am pleased to announce version 4.1 of the widget callback package Wcb.

What is new in Wcb 4.1?
-----------------------

1. The demo script "listboxtest1.tcl" now correctly takes into account
    that the names of all bitmap files in the directory "images" have the
    suffix ".xbm", regardless of the Tk version being used.

2. Restored the support for Tcl/Tk 8.4, which was broken due to the use
    of package version numbers with a trailing "-" (thanks to Samuel
    Brown for his bug report).

How to get it?
--------------

Wcb is available for free download from the Web page

     https://www.nemethi.de

The distribution file is "wcb4.1.tar.gz" for UNIX and "wcb4_1.zip" for
Windows.  These files contain the same information, except for the
additional carriage return character preceding the linefeed at the end
of each line in the text files for Windows.

Wcb is also included in tklib, which has the address

     https://core.tcl.tk/tklib

How to install it?
------------------

Install the package as a subdirectory of one of the directories given
by the "auto_path" variable.  For example, you can install it as a
directory at the same level as the Tcl and Tk script libraries.  The
locations of these library directories are given by the "tcl_library"
and "tk_library" variables, respectively.

To install Wcb on UNIX, "cd" to the desired directory and unpack the
distribution file "wcb4.1.tar.gz":

     gunzip -c wcb4.1.tar.gz | tar -xf -

On most UNIX systems this can be replaced with

     tar -zxf wcb4.1.tar.gz

This command will create a directory named "wcb4.1", with the
subdirectories "demos", "doc", and "scripts".

On Windows, use WinZip or some other program capable of unpacking the
distribution file "wcb4_1.zip" into the directory "wcb4.1", with the
subdirectories "demos", "doc", and "scripts".

How to use it?
--------------

To be able to use the commands and variables implemented in the package
Wcb, your scripts must contain one of the lines

     package require wcb ?version?
     package require Wcb ?version?

Since the package Wcb is implemented in its own namespace called "wcb",
you must either import the procedures you need, or use qualified names
like "wcb::callback".

For a detailed description of the commands and variables provided by
Wcb and of the examples contained in the "demos" directory, see the
tutorial "wcb.html" and the reference page "wcbRef.html", both located
in the "doc" directory.

-- 
Csaba Nemethi  https://www.nemethi.de  mailto:csaba.nemethi@t-online.de

Click on article to view the messages of the thread
ANNOUNCE: OpenACS 5.10.1 available
Posted by neumann@wu-wien.ac.at (gustafn) 4 weeks 1 day ago
Last contribution 4 weeks 1 day ago 2
Replies:
  • Stefan Sobernig <stefan.sobernig@wu.ac.at> replied 4 weeks 1 day ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 4 weeks 1 day ago
Release of OpenACS 5.10.1:

We are proud to announce the release of the OpenACS 5.10.1 [1].
The release of OpenACS 5.10.1 contains the 100 packages of the
oacs-5-10 branch. These packages include the OpenACS core packages,
the major application packages (e.g., most of the ones used on
OpenACS.org), and DotLRN 2.10.1. The release is probably the most
secure and with the most tested code since ever.

Altogether, OpenACS 5.10.1 differs from OpenACS 5.10.0 by the following
statistics

   3038 files changed, 1291141 insertions(+), 354533 deletions(-)

These changes were contributed by 8 committers
   - Antonio Pisano
   - Gustaf Neumann
   - Günter Ernst
   - Héctor Romojaro
   - Michael Aram,
   - Raúl Rodríguez,
   - Sebastian Scheder, and
   - Thomas Renner

and additional 8 patch/bugfix providers
    - Felix Mödritscher,
    - Frank Bergmann,
    - Franz Penz,
    - Josue Cardona,
    - Keith Paskett,
    - Markus Moser,
    - Marty Israelsen, and
    - Monika Andergassen

all sorted by the first names.

In terms of changes, the release contains the largest amount of
changes of the releases in the last 10 years. The packages with the
most changes are acs-tcl, acs-templating, xowiki, xowf,
acs-automated-testing, acs-admin, and xotcl-core.

For a partial summary of changes, please check the release notes [2],
for the more detailed list of changes since the release of OpenACS
5.10.0, see [3]. Many changes/enhancements of the application packages
are just contained in the detailed changelog.

All packages of the release were tested with PostgreSQL 16.* and Tcl
8.6.*.
Many thanks to everybody who made this release possible!

[1] https://openacs.org/
[2] https://openacs.org/doc/release-notes
[3] https://openacs.org/changelogs/ChangeLog-5.10.1

Click on article to view the messages of the thread
ANNOUNCE: xdgicons
Posted by Schelte <nospam@wanadoo.nl> 1 month ago
Last contribution 1 month ago 0
I am pleased to announce the publication of the xdgicons package.

This package is intended to locate image files for icons following the 
XDG Icon Theme Specification. This is the standard method for finding 
icons on the linux desktop. Using it will improve the way Tcl/Tk 
applications fit in with the other applications on the linux desktop.

Configuration options are available to control which base directories 
and themes to search, as well as the desired image formats and scaling 
factor (for use with high density displays).

Even though the package is geared toward linux, it can be used on other 
platforms if some icon theme compatible with the XDG specification is 
included in the application or otherwise available on the platform. This 
would still provide the benefit of easily picking icons that match the 
screen resolution.

The package is hosted on chiselapp.
Documentation: https://chiselapp.com/user/schelte/repository/xdgicons/
Downloads: https://chiselapp.com/user/schelte/repository/xdgicons/download
Screenshots: 
https://chiselapp.com/user/schelte/repository/xdgicons/wiki?name=Screenshots

Any feedback is welcome.


Schelte.

Click on article to view the messages of the thread
Curious event behaviour
Posted by Helmut Giese <hgiese@ratiosoft.com> 1 month ago
Last contribution 1 month ago 4
Replies:
  • Helmut Giese <hgiese@ratiosoft.com> replied 1 month ago
  • Rich <rich@example.invalid> replied 1 month ago
  • Helmut Giese <hgiese@ratiosoft.com> replied 1 month ago
  • Rich <rich@example.invalid> replied 1 month ago
Hello out there,
take the following script:
	---
package require Tk
foreach ch [winfo children "."] {destroy $ch}

# This variable controls whether the events happen during the script's
# execution or are scheduled for some time after
set evInScript 0

set c [canvas .c -width 400 -height 300 -bd 0 -bg lightyellow]
pack $c
set id1 [$c create rectangle 100 100 200 200 -fill red]
set id2 [$c create rectangle 200 100 300 200 -fill green]

foreach id [list $id1 $id2] {
    $c bind $id <Button-1> [list puts "<Button-1> for id $id"]
    $c bind $id <Shift-Button-1> [list puts "<Shift-Button-1> for id
$id"]
}
if {$evInScript} {
    after 1000
    event generate $c <Button-1> -x 150 -y 150
    after 2000
    event generate $c <Shift-Button-1> -x 250 -y 150
} else {
    after 1000 {event generate $c <Button-1> -x 150 -y 150}
    after 2000 {event generate $c <Shift-Button-1> -x 250 -y 150}
}
puts "Done for evInScript == $evInScript"
	---
It programs two events which are to be executed either "inline" in the
script (evInScript == 1) or scheduled for some time after.
This is the result:
	---
Microsoft Windows [Version 10.0.19045.4842]
(c) Microsoft Corporation. Alle Rechte vorbehalten.

d:\proj\_ToolsSE\Skeleton\TclTests>tclsh tst.tcl
Done for evInScript == 0
<Button-1> for id 1
<Shift-Button-1> for id 2

d:\proj\_ToolsSE\Skeleton\TclTests>tclsh tst.tcl
Done for evInScript == 1
	---
In the second case the events never happened (or they happened but
were not recognized, which amounts to the same). I consider this a
bug. Should I submit a ticket?

This is on Windows 10 with Tcl 8.6.10 and 8.6.13
Helmut

Click on article to view the messages of the thread
tcltest package applicable for GUI apps?
Posted by Helmut Giese <hgiese@ratiosoft.com> 1 month ago
Last contribution 1 month ago 2
Replies:
  • Helmut Giese <hgiese@ratiosoft.com> replied 1 month ago
  • guest@rocksolidbbs.com (guest) replied 1 month ago
Hello out there,
I wanted to use tcltest in conjunction with the development of a
fairly complex GUI app, but I have nothing but difficulties.
My situation is:
- I have a canvas with several objects
- The user can connect them, can select one or several of them and
move them around, etc.
Is it at all possible to use tcltest for simulating all kinds of user
interaction with such  a GUI?

I checked the tests of TK in the TK source tree but they concentrate
(understandebly) on testing the internal workings, like 'canvas
moveto' some rectangle and testing the resulting coordinates - nothing
like I was looking for.

Any idea, tip or link will be greatly appreciated
Helmut

Click on article to view the messages of the thread
A mouse pointer question
Posted by Helmut Giese <hgiese@ratiosoft.com> 1 month ago
Last contribution 1 month ago 2
Replies:
  • Helmut Giese <hgiese@ratiosoft.com> replied 1 month ago
  • Schelte <nospam@wanadoo.nl> replied 1 month ago
Hello out there,
is it possible to obtain the current position of the  mouse pointer
WITHOUT any user action? During Motion etc. events it is easy but
without? Is it possible?
Any answer will be greatly appreciated
Helmut

Click on article to view the messages of the thread
ANNOUNCE: valkey-tcl 1.0.0
Posted by Konstantin Kushnir <chpock@gmail.com> 1 month 1 week ago
Last contribution 1 month 1 week ago 3
Replies:
  • Konstantin Kushnir <chpock@gmail.com> replied 1 month 1 week ago
  • Colin Macleod <user7@cmacleod.me.uk.invalid> replied 1 month 1 week ago
  • Colin Macleod <user7@cmacleod.me.uk.invalid> replied 1 month 1 week ago
Hi Everyone!

I am pleased to announce version 1.0.0 of valkey-tcl.

valkey-tcl is TCL/C extension that provides an interface to the Valkey
key-value store.

The Valkey database is a BDS-licensed fork of the well-known Redis
in-memory, NoSQL data store, supported by the Linux Foundation:
https://valkey.io/

This is the first version and it does not support every possible
feature, but it should provide enough features for production use.

At this point, the key features are:
* supports connections via TCP or UNIX sockets
* supports TLS/SSL connections (this requires TLS/SSL support in the
  linked libvalkey, and must be enabled explicitly)
* supports Linux and MacOS platforms
* supports authorization
* supports automatic reconnection with retries in case of connection
  loss
* supports all valkey commands via universal command interface
* built as a single loadable shared object
* MIT license

Homepage and sources are on github: https://github.com/jerily/valkey-tcl

Please fill free to check/build/use it. Any feedback is welcome!

-- 
Best regards,
Konstantin Kushnir

Click on article to view the messages of the thread
How to simulate a 'shift click'
Posted by Helmut Giese <hgiese@ratiosoft.com> 1 month 1 week ago
Last contribution 1 month 1 week ago 2
Replies:
  • Helmut Giese <hgiese@ratiosoft.com> replied 1 month 1 week ago
  • Ian <gay@sfuu.ca> replied 1 month 1 week ago
Hello out there,
I can simulate a simple click but fail at a 'shift click'.
Below is what I tried:
	---
package require Tk
foreach ch [winfo children "."] {destroy $ch}

# create a test app
set btn [ttk::button .btn -text "Press me"]
pack $btn
# add some bindings
bind $btn <Button-1> {puts "Simple click"}
bind $btn <Shift-Button-1> {puts "Shift click"}

focus $btn
set x [winfo x $btn] ; set y [winfo y $btn]
# place the mouse
event generate "." <Motion>  -x [incr x 50] -y [incr y 10] -warp 1

event generate $btn <ButtonPress-1>
after 100 ; event generate $btn <ButtonRelease-1>

# now a 'shift click'
if 1 {
event generate $btn <KeyPress> -keysym Shift_L
} else {
event generate $btn <Key-Shift_L>   
}
event generate $btn <ButtonPress-1>
after 100 ; event generate $btn <ButtonRelease-1>
event generate $btn <KeyRelease> -keysym Shift_L
	---
All I ever get is twice 'Simple click' - no matter whether I use
<Key-Shift_L>  or the longer form, wether I generate the keypress for
$btn or  ".". I am out of ideas what to try next.
Any help will be greatly appreciated
Helmut.
PS: This is on Windows with Tcl 8.6.10

Click on article to view the messages of the thread
Androwish for dummies...
Posted by Bill Waddington <william.waddington@beezmo.com> 2 months ago
Last contribution 1 month 1 week ago 13
Replies:
  • Bill Waddington <william.waddington@beezmo.com> replied 1 month 1 week ago
  • Bill Waddington <william.waddington@beezmo.com> replied 1 month 3 weeks ago
  • Bill Waddington <william.waddington@beezmo.com> replied 1 month 3 weeks ago
  • Bill Waddington <william.waddington@beezmo.com> replied 1 month 3 weeks ago
  • Helmut Giese <hgiese@ratiosoft.com> replied 1 month 3 weeks ago
  • Bill Waddington <william.waddington@beezmo.com> replied 1 month 3 weeks ago
  • Helmut Giese <hgiese@ratiosoft.com> replied 1 month 3 weeks ago
  • Bill Waddington <william.waddington@beezmo.com> replied 1 month 3 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months ago
  • Bill Waddington <william.waddington@beezmo.com> replied 2 months ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months ago
  • Bill Waddington <william.waddington@beezmo.com> replied 2 months ago
  • Ashok <apnmbx-public@yahoo.com> replied 2 months ago
Hello all,

This is extremely embarrassing. A few years back - with the kind help
of several of you here - I used Androwish to build an apk of my little
Kanji flash card app.

https://www.beezmo.com/geezblog/?p=1842

Newer tablet, higher density display, and I'd like to modify some
fonts and build it again.

Thing is, for the life of me I can't remember how I built it.  No
excuse, except that I'm 75 now...

I've dug around in the online documentation, and I'm overwhelmed.

Can someone point me to the simplest way to do this?  I mean:
KanjiQuiz.tcl > <one-click Androwish magic> > KanjiQuiz.apk.

Yours in ignorance - thanks and regards,
Bill
-- 
William D Waddington

"Even bugs...are unexpected signposts on
the long road of creativity..." - Ken Burtch

Click on article to view the messages of the thread
Crash in Itcl when using Iwidgets in multiple threads
Posted by Petro Kazmirchuk <vivid.tree7955@fastmail.com> 1 month 1 week ago
Last contribution 1 month 1 week ago 5
Replies:
  • undroidwish <undroidwish@googlemail.com> replied 1 month 1 week ago
  • undroidwish <undroidwish@googlemail.com> replied 1 month 1 week ago
  • Schelte <nospam@wanadoo.nl> replied 1 month 1 week ago
  • Petro Kazmirchuk <vivid.tree7955@fastmail.com> replied 1 month 1 week ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 1 month 1 week ago
Minimal example:

package require Thread

set thread_script {
     package require Iwidgets
     iwidgets::pushbutton .btn -text [thread::id]
     pack .btn
     after 4000 [list thread::release [thread::id]]
     thread::wait
}

for {set i 0} {$i<1000} {incr i} {
     thread::create -preserved $thread_script
     after 500
}

This code runs 8 threads in parallel each showing an iwidget (pushbutton 
or anything else, doesn't matter) and after ~1 minute it crashes with:

Unhandled exception at 0x00007FF8846DA6E4 (itcl424t.dll) in 
tclsh86t.exe: 0xC0000005: Access violation reading location 
0x0000000000000018.

Windows, Tcl 8.6.14, Itcl 4.2.4, Itk 4.2.6, Iwidgets 4.1.
The same crash happens when using the Itk written in pure Tcl: 
https://chiselapp.com/user/rene/repository/itk/home

That's why I'm convinced the problem is in Itcl rather than Itk, and the 
stack trace points to Itcl as well. Probably, there is a mutex missing 
somewhere.

I didn't try to reproduce it on Linux.

I understand that both Iwidgets and Itcl are legacy that is barely 
maintained, that's why I'm not raising a bug in Fossil that very few 
people would notice. What I'm asking instead from a much wider audience 
here is for a workaround. Is it possible to change my code somehow to 
avoid the crash? Of course, preserving the basic multi-threaded 
architecture.

The original code is a huge framework that can't be rewritten to 
separate GUI into one main thread.

Thanks in advance,
Petro

Click on article to view the messages of the thread
try command error codes, where documented?
Posted by et99 <et99@rocketship1.me> 1 month 2 weeks ago
Last contribution 1 month 1 week ago 6
Replies:
  • et99 <et99@rocketship1.me> replied 1 month 1 week ago
  • clt.to.davebr@dfgh.net replied 1 month 1 week ago
  • et99 <et99@rocketship1.me> replied 1 month 1 week ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 1 month 2 weeks ago
  • et99 <et99@rocketship1.me> replied 1 month 2 weeks ago
  • greg <gregor.ebbing@gmx.de> replied 1 month 2 weeks ago
Is there a good place to lookup the various error codes returned by tcl commands?

In the try command manual there's an example:

try {
     set f [open /some/file/name w]
} trap {POSIX EISDIR} {} {
     puts "failed to open /some/file/name: it's a directory"
} trap {POSIX ENOENT} {} {
     puts "failed to open /some/file/name: it doesn't exist"
}

How did the writer of this example know about these two error cases since they are not documented in the manual under either try or open.

Also, are POSIX error codes system independent?


Click on article to view the messages of the thread
File drags from tcl/tkdnd apps into a GTK3 app are ignored
Posted by eric_gilbertson@yahoo.com (ericg) 1 month 1 week ago
Last contribution 1 month 1 week ago 0
File drags from my tcl/tkdnd app into a GTK3 app are ignored. The issue
appears to be that the drop data is interpreted as a string rather than
a list of file URIs, e.g. dropData.get_data() returns the dropped file
name but dropData.get_uris() returns an empty list, as demonstrated by
the following demo code. I also noticed that the drop target cursor
changes to a hand when dropping a file from Nautilus File (Gtk based)
tool but it does not change when dropping from the tcl/tk app. Any
pointers on how to get the tck/tk client to work with Gtk3 are much
appreciated. Alternatively, is there a tool that I can use to view the
WM messages that are sent during the drag/drop in order to debug the
issue? I am running Gnome 42.9 on Ubuntu 22.04.

Tcl/tkdnd drop file source app:
package require tkdnd
catch {console show}

pack [ttk::button .drag_source_files -text " Drag File "] -fill x -padx
20 -pady 20

tkdnd::drag_source register .drag_source_files DND_Files

bind .drag_source_files <<DragInitCmd>> \
  {list {copy} DND_Files [list "file:///tmp/test.wav" ]}

## Event <<DragEndCmd>>
bind .drag_source_files <<DragEndCmd>> {
  puts "Drop action: %A"
}

Gtk drop receiver app:

import gi
gi.require_version("Gdk", "3.0")
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk

window = Gtk.Window()
window.connect("delete-event", Gtk.main_quit)

box = Gtk.HBox()
window.add(box)

# Called when the Drop button is dropped on
def on_drag_data_received(widget, drag_context, x, y, data, info, time):
    print("Received uris: {}".format(data.get_uris())) # returns empty
list
    print("Received data: {}".format(data.get_data())) # returns file
name

# The button into which the file can be dropped
drop_button = Gtk.Button(label="Drop")
drop_button.drag_dest_set(Gtk.DestDefaults.ALL, [], Gdk.DragAction.COPY)
drop_button.drag_dest_add_uri_targets() # This makes sure that the
buttons are using URIs, not text
drop_button.connect("drag-data-received", on_drag_data_received)
box.add(drop_button)

window.show_all()
Gtk.main()

Click on article to view the messages of the thread
Modern alternative to Iwidgets?
Posted by Petro Kazmirchuk <vivid.tree7955@fastmail.com> 1 month 2 weeks ago
Last contribution 1 month 1 week ago 3
Replies:
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 1 month 1 week ago
  • Petro Kazmirchuk <vivid.tree7955@fastmail.com> replied 1 month 1 week ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 1 month 1 week ago
Hi all,
I'm looking for a reasonably modern alternative to Iwidgets:
- must NOT use snit or itcl
- ideally, written without any C code
- ideally, ttk-aware

Do you think that apave could be a decent candidate? 
https://aplsimple.github.io/en/tcl/pave/

Any other good candidates?
Thanks in advance,
Petro

Click on article to view the messages of the thread
how can I replace ~/ in tcl8 and 9 code?
Posted by clt.to.davebr@dfgh.net 1 month 2 weeks ago
Last contribution 1 month 2 weeks ago 0
Right now I've using a package that redefines [file] to add the home subcommand.
Then: source ~/src/tcl/xx
becomes: source [file join [file home] src/tcl/xx]
which works in Tcl8 and 9

Is there a simpler way to replace ~/ in code that needs to run under Tcl8 and Tcl9 ?

daveb

Click on article to view the messages of the thread
Performance of list / array / dict compared
Posted by RodionGork <rodiongork@github.com> 1 month 2 weeks ago
Last contribution 1 month 2 weeks ago 5
Replies:
  • neumann@wu-wien.ac.at (gustafn) replied 1 month 2 weeks ago
  • Rich <rich@example.invalid> replied 1 month 2 weeks ago
  • Rich <rich@example.invalid> replied 1 month 2 weeks ago
  • RodionGork <rodiongork@github.com> replied 1 month 2 weeks ago
  • Gerald Lester <Gerald.Lester@gmail.com> replied 1 month 2 weeks ago
Hi Friends!

I've seen here curious thread on comparing TCL speed with Python - and
as a "sequel" to it here is more TCLish observation.

It happened that I was also measuring languages performance (for
practical purpose - to get understanding how much calculations would fit
in 1 second limited sandbox on my site). There are two tests - for plain
integer calculations - and for calculations involving array.

I initially used list as array and while performance is somewhat lower
than with other popular scripting languages, I thought it is quite
decent, regarding list implementation (I thought it is a kind of
space-separated string by then).

Then I browsed TCL tutorial and rewrote implementations using array and
finally, dict. They were
significantly worse, which is explainable as they are not necessarily
tuned to work as linear array - but I was somewhat surprised to see the
"dict" is the worst of all (perhaps it in improved in the versions above
8.5):


C (long long): 4.28
PHP: 11.99
Python3: 42.57
TCL (list): 63.30
TCL (array): 104.78
TCL (dict): 112.41
Lua: 33.75

Implementation is here and you are welcome to check whether I missed
some obvious way to improve results:
https://github.com/rodiongork/languages-benchmark

As a sidenote, PHP and Lua use single version of array for both "linear"
and "dict-like" storage.

-- 
to email me substitute github with gmail please

Click on article to view the messages of the thread
Looking for TkDnD binaries compatible with Tcl9
Posted by aldo.w.buratti@gmail.com (abu) 1 month 2 weeks ago
Last contribution 1 month 2 weeks ago 1
Replies:
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 1 month 2 weeks ago
Please
where can I find binaries for tkDnD , compatible with Tcl9 ?

My goal is to assemble all the dll/so (Win,Linux,Mac) in a
multi-platform package.

Click on article to view the messages of the thread
Array get element with default (no error if not exist)
Posted by RodionGork <rodiongork@github.com> 1 month 2 weeks ago
Last contribution 1 month 2 weeks ago 7
Replies:
  • Rich <rich@example.invalid> replied 1 month 2 weeks ago
  • RodionGork <rodiongork@github.com> replied 1 month 2 weeks ago
  • Rich <rich@example.invalid> replied 1 month 2 weeks ago
  • RodionGork <rodiongork@github.com> replied 1 month 2 weeks ago
  • Ralf Fassel <ralfixx@gmx.de> replied 1 month 2 weeks ago
  • Emiliano <emil.g@example.invalid> replied 1 month 2 weeks ago
  • Ralf Fassel <ralfixx@gmx.de> replied 1 month 2 weeks ago
Hi Friends!

Still making my first feeble steps in TCL so please excuse me if this is
naive or was asked multiple times.

Attempt to fetch by non-existing key in "associative array" results in
error, e.g.

set a(1) 5
puts $a(2) ;# yields error

the workaround seems to be [info exists ::a(2)] which feels a bit remote
from other "array" commands.

Is there some motivation why some command for get-with-default is not
implemented, e.g.

puts [array peek $a 2 "default value"]

Popular use-case for this would be creating map where elements are
updated (like counter of words etc) - though I found this is cleverly
covered by "incr" and "append" commands properly behaving
when element to be incremented or appended does not exist yet.

But I suspect there are other situations when such a command may be
handy.

Also why [array exists ...] command does not exist (while [dict exists
...] does)? Perhaps there is something about no good syntax for it due
to how arrays are implemented?

-- 
to email me substitute github with gmail please

Click on article to view the messages of the thread
ANNOUNCE: NaviServer 4.99.31 available
Posted by neumann@wu-wien.ac.at (gustafn) 1 month 2 weeks ago
Last contribution 1 month 2 weeks ago 0
Dear all,

I am glad to announce that the release of NaviServer 4.99.31 is
available at SourceForge [1] and on GitHub [2]. In essence, this release
contains a few small bug fixes and some backported features from the
NaviServer 5 development (auto SNI and Improved handling of large file
uploads, portability improvements). Since we want to release NaviServer
5 after Tcl9, and Tcl9 is still not out, some of the backports become
more urgent.

The installation scripts [3] are pointing now per default to version
4.99.31.

If you are interested in the newest version of NaviServer, don't
hesitate to try it from the main branch of the GitHub repository [4].

All the best!

-gustaf neumann

[1]
https://sourceforge.net/projects/naviserver/files/naviserver/4.99.31/
[2] https://github.com/orgs/naviserver-project/repositories
[3] https://github.com/gustafn/install-ns
[4] https://github.com/naviserver-project/naviserver

All the best!
-gustaf neumann

=======================================
NaviServer 4.99.31, released 2024-08-11
=======================================

 71 files changed, 897 insertions(+), 303 deletions(-)

New Features:
-------------

  - Added auto-SNI support to "ns_http" and "ns_connchan open": When
    opening an TLS-connection to named target, the used hostname is
    automatically used as a default value for the SNI-host.  The
    automatically derived values has a lower priority than the
    parameter "-hostname" of "ns_http run" or "ns_connchan open".

    This change eases of use with cloud services and affects all
    packages using, e.g., "ns_http", including reverse proxies.

  - Introduced experimental command "ns_fseekchars": This changes
    Improves file-based parsing of multipart/form-data, supporting
    files larger than 4GB, reducing memory usage, and speeding up
    processing..

Bug Fixes:
----------

    - Fixed invalid memory reallocation of pool descriptors array
      [commit 7efaafe4].

    - Fixed potential issue for move operation with overlapping memory
      areas. This change is which was critical for ARM architecture
      when musl is used (Alpine Linux) [commit 20438ed4].

    - Fixed potential crash in "ns_conn copy" to handle cases where an
      incoming request contains no content [commit 79b8cb8a].

Changes in Sample Configuration Files:
--------------------------------------

    - Sample configuration file updates for handling container
      mappings and whitelisting domain names [commits ece849ac,
      9a102a97, 86a176ab].

    - Backported from NaviServer 5: Includes multiple changes to
      configuration files and scripts [commit 0d32e5ea].

Misc Improvements:
------------------

    - Improved forward compatibility to ease backports [commit
ef8b4386].

    - Improved spelling and documentation across multiple files to
      enhance readability and understanding [multiple commits e.g.,
      a2cdaa10, 15253120].

    - Improved portability by not assuming that type "char" is the
      same as "unsigned char", important for compatibility with
      different architectures [commit 7635ef00].

    - Made testing more robust for docker images with partial IPv6
      setups to improve reliability in varied deployment environments
      [commit 516ca38c].

    - Removed misleading and unneeded "-encoding binary": This command
      was a no-op since many Tcl releases and was removed in Tcl9 at
      all. This change clarifies code usage [commit a36d15b1].

Click on article to view the messages of the thread
ANNOUNCE: tcl9migrate - Tcl 8->9 migration tool
Posted by Ashok <apnmbx-public@yahoo.com> 1 month 2 weeks ago
Last contribution 1 month 2 weeks ago 0
This software is intended to help identify changes needed for migrating 
Tcl 8 scripts to Tcl 9. It has two modes of operation:

- a static analyzer based on Nagelfar that runs under both Tcl 8.6 and 9 
logging warnings for potential incompatibilities.

- a runtime analyzer. This is intended to only run under Tcl 9. It 
attempts to fix up invalid code (e.g. encodings, tilde references) at 
run time allowing the program to continue to run but logs warnings to 
stderr.

Documentation: 
https://github.com/apnadkarni/tcl9-migrate/blob/main/README.md
Downloads: https://github.com/apnadkarni/tcl9-migrate/releases
Repository: https://github.com/apnadkarni/tcl9-migrate

Click on article to view the messages of the thread
EuroTcl 2024 - presentation videos and slides now online
Posted by Colin Macleod <user7@cmacleod.me.uk.invalid> 1 month 2 weeks ago
Last contribution 1 month 2 weeks ago 1
Replies:
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 1 month 2 weeks ago
See: https://openacs.org/conf2024/info/schedule

-- 
Colin Macleod.

Click on article to view the messages of the thread
a trivial and complicated problem in TCL
Posted by aotto1968 <aotto1968@t-online.de> 1 month 3 weeks ago
Last contribution 1 month 3 weeks ago 2
Replies:
  • undroidwish <undroidwish@googlemail.com> replied 1 month 3 weeks ago
  • Ralf Fassel <ralfixx@gmx.de> replied 1 month 3 weeks ago
Hi,

I use

 > pkg_mkIndex -verbose . {*}$libs

to build a 'pkgIndex.tcl' file … GOOD
NOW I want to redirect the "stderr" output (-verbose) to stdout ... BAD

I can't figure out a "trivial" solution for this simple task IN tcl.

I know there are "exec/open" etc command there I can redirect the output of an EXTERNAL program
but this is not for a tcl INTERNAL "proc" like "pkg_mkIndex".

I know that I can start an second tclsh with the "pkg_mkIndex" and redirect the output BUT
I search for an tcl INTERNAL solution.

my CURRENT solution is way-to-over-engineerd
→ recreate the tcl "put" command and exchange "stderr" with "stdout"

=========================================
# ERASE "stderr" from tcl output
rename puts __tcl__puts
proc puts {args} {

   set nxt [lindex $args 0]
   if {[string index $nxt 0] eq "-"} {
     set nnl $nxt
     set args [lassign $args -]
   } else {
     set nnl ""
   }

   set nxt [lindex $args 0]
   if {[llength [chan names $nxt]]} {
     if {$nxt eq "stderr"} {
       set chn stdout
     } else {
       set chn $nxt
     }
     set args [lassign $args -]
   } else {
     set chn ""
   }

   __tcl__puts {*}[concat $nnl $chn $args]
}
=======================================

What I look for is something like:

 > chan redirect /dev/stderr /dev/stdout

which works without touching any TCL related "proc" stuff or
spawn an extra shell.


→ any idea ?

Click on article to view the messages of the thread
memory usage
Posted by saito <saitology9@gmail.com> 1 month 3 weeks ago
Last contribution 1 month 3 weeks ago 4
Replies:
  • saito <saitology9@gmail.com> replied 1 month 3 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 1 month 3 weeks ago
  • saito <saitology9@gmail.com> replied 1 month 3 weeks ago
  • Rich <rich@example.invalid> replied 1 month 3 weeks ago
Sorry this may be quite basic but just wanted to confirm it:

Let's say that I have a proc which generates a large dict and returns 
it. Then when used, the caller assigns it to a variable.

How much memory is used, 10mb or 20mb? (let's ignore any extra memory 
needed to manage the dict structure and the proc calls).


proc generate_10mb_dict {a b c} {
  # generate a large dict, in d

  return $d
}

set my_data [generate_10mb_dict $a $b $c]


what is the ram use at this point?

Click on article to view the messages of the thread
? BUG - Tcl9.0b3 Linux - canvas bind
Posted by aldo.w.buratti@gmail.com (abu) 1 month 3 weeks ago
Last contribution 1 month 3 weeks ago 5
Replies:
  • Christian Gollwitzer <auriocus@gmx.de> replied 1 month 3 weeks ago
  • aldo.w.buratti@gmail.com (abu) replied 1 month 3 weeks ago
  • greg <gregor.ebbing@gmx.de> replied 1 month 3 weeks ago
  • Paul Obermeier <obermeier@poSoft.de> replied 1 month 3 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 1 month 3 weeks ago
Please, can you run this 4-lines script on Linux with TclTk 9.0b3 ?

Note that it runs as expected with TclTk 9.0b3 on Windows and MacOS, so
I suspect
 a) my Linux build is wrong
 b) it's a bug only for unix (Linux Ubuntu in my case)

Any suggestion is appreciated.
Here's the script


## ---------------------------------------------------------------------

# Test with TclTk 9.0b3
#   Windows: OK
#   Linux (Ubuntu): not working (OVAL doesn't change color, no message
is printed)
#   MacOS: OK


pack [canvas .c -background yellow]
c create oval {20 20 200 200} -fill red  -activefill blue -tag OVAL

c bind OVAL <Enter> { puts "Entering the OVAL"}
c bind OVAL <ButtonPress-1> { puts "Clicked inside the OVAL"}

 #  Expected behaviour:
 #    when moving the cursor inside the OVAL
 #      - it turns from red to blue
 #      - a message is printed
 #    when clicking the OVAL
 #      - a message is printed

# -------------------------------------------------------------

Click on article to view the messages of the thread
Generate <Shift-Button> event on a canvas (on Windows)
Posted by Helmut Giese <hgiese@ratiosoft.com> 1 month 4 weeks ago
Last contribution 1 month 3 weeks ago 4
Replies:
  • Helmut Giese <hgiese@ratiosoft.com> replied 1 month 3 weeks ago
  • Schelte <nospam@wanadoo.nl> replied 1 month 3 weeks ago
  • Helmut Giese <hgiese@ratiosoft.com> replied 1 month 3 weeks ago
  • Helmut Giese <hgiese@ratiosoft.com> replied 1 month 3 weeks ago
Hello out there,
I am writing tests (using tcltest) to avoid any regression during
development but I hit something like a brick wall: 'event generate'
appears not to work on items of a canvas. On regular widgets no
problem:  It can produce events like <Button-1>, <Shift-Button-1> ,
etc.
With twapi on the other hand I can produce <Button-1> events
everywhere: canvas, widgets - but no <Shift-Button-1>, so I'm stuck.
So the question is: How to make 'event generate' work on canvas items
or how to tweak twapi to also produce <Shift-Button> events.
Any help will be greatly apppreciated
Helmut
PS: I am running Tcl 8.6.10 under Windows 10, 64 bit

Click on article to view the messages of the thread
ANNOUNCE: cookbox 1.0.0
Posted by Konstantin Kushnir <chpock@gmail.com> 2 months ago
Last contribution 1 month 3 weeks ago 2
Replies:
  • Konstantin Kushnir <chpock@gmail.com> replied 1 month 3 weeks ago
  • Ashok <apnmbx-public@yahoo.com> replied 1 month 4 weeks ago
Hi Everyone!

I'd like to announce a small example of practical use of the cookfs
package (https://github.com/chpock/cookfs) in applications.

Here is cookbox. 

It is an utility to pack, unpack, view cookfs archives, and more...

The following examples are demonstrated in this utility:

* how to create a cookfs archive with Tcl runtime libraries/scripts and
  application scripts during the build process
* how to use cookfs and build a single executable with Tcl interpreter,
  Tcl runtime scripts, application scripts
* how to use cookfs from Tcl scripts to store data

The modes of packing, unpacking and viewing archives are similar to the
GNU tar utility and will most likely be very familiar to you. Tcl
hackers will be more interested in the additional modes:

Run interactive Tcl shell (-shell)
====

tclsh with TclReadLine is bundled and can be run interactively. For
example:

$ ./cookbox --shell
> set tcl_patchLevel
9.0b3
> puts "Hello world!"
Hello world!

> exit

Evaluate the provided script or file (--eval)
====

Using this option it is possible to execute a Tcl script from the
command line or a file. For example:

$ ./cookbox --eval 'puts "Hello world!"'
Hello world!

or 

$ cat script.tcl
puts "Hello World!"
$ ./cookbox --eval -f script.tcl
Hello World!

Wrap files to an executable (--cookinize)
====

Using this option, it is possible to make an executable file from a Tcl
script. Use the file name main.tcl as it is this file in the archive
that runs automatically at startup. For example:

$ cat main.tcl
puts "Hello World!"
$ ./cookbox --cookinize -f myapplication main.tcl
$ ./myapplication
Hello World!

Analyze an archive (--analyze)
====

Using this option it is possible to check the content of an archive.
For example, in this case cookbox will show its own content:

$ ./cookbox --analyze -f cookbox
<here is an output of coobox archive content>

Full examples with details, build instructions and binaries for
platforms Linux, Windows, MacOS are available on the corresponding
github page: https://github.com/chpock/cookbox

Please fill free to check/build/use it. Any feedback is welcome!

-- 
Best regards,
Konstantin Kushnir

Click on article to view the messages of the thread
Tcl/Tk logo – rebrand for 9.0 or stay consistent?
Posted by Colin Macleod <user7@cmacleod.me.uk.invalid> 1 month 4 weeks ago
Last contribution 1 month 4 weeks ago 0
Tcl/Tk 9.0 is approaching release, so I think this could be a good opportunity to
update the logo. My feeling is that the existing feather logo is obscure, and
also too easily confused with the Apache project logo. However some people are
very attached to it. So I'm trying to gather feedback on whether a rebrand would
be helpful, or whether continuity is more valuable. If you have an opinion,
please either vote in the poll I have created at
    https://mastodon.scot/@CGM/112908834664981456
or just give feedback here.

-- 
Colin Macleod.

Click on article to view the messages of the thread
ANNOUNCE: Magicsplat 2.0.1 Tcl/Tk 9.0b3 for Windows Beta
Posted by Ashok <apnmbx-public@yahoo.com> 2 months ago
Last contribution 1 month 4 weeks ago 2
Replies:
  • Ashok <apnmbx-public@yahoo.com> replied 1 month 4 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months ago
Version 2.0.1 (Beta) of the Magicsplat Tcl/Tk 9.0b3 for Windows binary 
distribution is released. Includes a limited number of packages that 
have been ported to Tcl 9. Home page: 
https://www.magicsplat.com/tcl-installer/index.html

Click on article to view the messages of the thread
how can I detect if the shift key is currently down (on windows) (twapi?)
Posted by et99 <et99@rocketship1.me> 2 months ago
Last contribution 1 month 4 weeks ago 4
Replies:
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 1 month 4 weeks ago
  • et99 <et99@rocketship1.me> replied 2 months ago
  • et99 <et99@rocketship1.me> replied 2 months ago
  • Ashok <apnmbx-public@yahoo.com> replied 2 months ago
I want to launch a windows batch job, which then runs a tcl program (passing in the file names dnd'd onto the batch file).

I would like to also be able to detect if the shift key is currently down in the tcl program. I can't use a normal key binding since the shift key will be pressed (and held) down before the tcl program is launched.

I asked chatGPT how this can be done, and it said:

#include <windows.h>

bool IsShiftKeyDown() {
     return (GetAsyncKeyState(VK_SHIFT) & 0x8000) != 0;
}

when I asked how to do this with tcl, it said to use a direct windows api call using twapi, and gave this (wrong) answer:

package require twapi

proc is_shift_down {} {
     set result [twapi::call user32 GetAsyncKeyState VK_SHIFT]
     return [expr ($result & 0x8000) != 0]
}


However, there is mentioned in the twapi docs that one can do a direct call, which this chatGPT example was attempting to do, but unfortunately, the docs says:

"The Windows API may be directly accessed by Tcl commands that map to Windows functions. This interface is not documented in the TWAPI documentation."

Assuming the above C code is correct, does anyone know how to use twapi to make that call?

Or... is there some way that tcl can do it directly?

Click on article to view the messages of the thread
License question of tclexecomp
Posted by Michael Niehren <michael@niehren.de> 2 months 1 week ago
Last contribution 2 months ago 3
Replies:
  • Michael Niehren <michael@niehren.de> replied 2 months ago
  • elns <look@the.footer.invalid> replied 2 months ago
  • Ashok <apnmbx-public@yahoo.com> replied 2 months ago
Hi together,

i see on the wiki one comment about the unknown license of tclexecomp. In
sum, tclexecomp is only a collection of scripts, which build TclTk and the
included modules from source and together with some tcl code i got the
binaries for the different operation systems.

As of V2.0.0, there was an complete code rewrite, so it isn't based on
freewrap anymore, only the ideas of building such a batterie included
TclTk distribution has been used.

I developed this tool as it is very useful for my own TclTk projects and
as i am no coder (besides TclTk), that's my way to give something back to
the great TclTk community. Maybe it's useful for other's too.

So, what license to take ?
From my side (the scripts i wrote), everyone can use and modify it
like he want without any warranty from my side. I will update the sources
on sourgeforge soon, so everyone can even do that.

Do i have to include a license text file, where all the licenses of all
included modules, included the TclTk license are listed ?
Or is some small license text like in Ashok's Magicsplat
(https://www.magicsplat.com/tcl-installer/#license) enough ?


Click on article to view the messages of the thread
Tcl / Tk 9.0b3 RELEASED
Posted by Don Porter <donald.porter@nist.gov> 2 months ago
Last contribution 2 months ago 0
Tcl/Tk 9.0b3 Release Announcement
July 31, 2024

The Tcl Core Team is pleased to announce the 9.0b3 releases of the Tcl
dynamic language and the Tk graphical interface package.  These are the
third beta releases of Tcl 9.0 and Tk 9.0.  More details can be found below.

We would like to express our gratitude to all those who submit bug
reports and patches.  This information is invaluable in enabling us
to identify and eliminate problems in the core. Such reports can be
submitted here.

	https://core.tcl-lang.org/tcl/ticket
	https://core.tcl-lang.org/tk/ticket

We ask that you log in (anonymous if you wish) to create tickets.
This deters abuse of the ticketing system:

	https://core.tcl-lang.org/tcl/login
	https://core.tcl-lang.org/tcl/login

Where to get the new releases:
------------------------------

Tcl/Tk 9.0b3 sources are freely available as open source from the Tcl
SourceForge project's file distribution area:

         https://sourceforge.net/projects/tcl/files/

This distribution is source code only.  We keep links to some third
parties offering pre-built binaries for various systems here:

	https://www.tcl-lang.org/software/tcltk/bindist.html

General Summary
---------------

These are new major versions of both Tcl and Tk.  There are new features
to be enjoyed.  There are incompatibilities to be considered.  The list
of both is long and detailed and not fully included here.  We believe many
scripts written for Tcl 8 will run unchanged in Tcl 9.  We believe many more
can be modified in small and simple ways to produce a new script that runs
in both Tcl 8 and Tcl 9.  We expect that extensions and applications using
the public C APIs of Tcl and Tk will involve more effort, but that it is
still within reasonable reach to produce source code supporting both Tcl 8
and Tcl 9 while both releases remain in widespread use.

These are beta releases.  The developers believe the new feature set is
complete enough and the code quality is high enough that it is time for
a larger audience of Tcl/Tk users to give them a try and report back
to the developers what difficulties need resolution before stable
releases of Tcl/Tk 9.0.0.

The experiences of Tcl/Tk 8 users adapting their code to the beta releases
of Tcl/Tk 9 will shape the final interfaces of Tcl/Tk 9.0.0, and will
determine the need for possible Tcl/Tk 8.7 releases that might supply
additional lifecycle and migration support.

It is not recommended to deploy these beta releases directly to mission
critical use without significant testing and review.

Tcl Changes Summary
-------------------

The source code for Tcl is managed by fossil.  Tcl developers coordinate all
changes to the Tcl source code at

> [Tcl Source Code](https://core.tcl-lang.org/tcl/timeline)

Release Tcl 9.0b3 arises from the check-in with tag core-9-0-b3.

Highlighted differences between Tcl 9.0 and Tcl 8.6 are summarized below,
with focus on changes important to programmers using the Tcl library and
writing Tcl scripts.

## 64-bit capacity: Data values larger than 2Gb

## Internationalization of text
  - Full Unicode range of codepoints
  - New encodings: utf-16/utf-32/ucs-2(le|be), CESU-8, etc.
  - `encoding` options -profile, -failindex manage encoding of I/O.
  - `msgcat` supports custom locale search list
  - `source` defaults to -encoding utf-8

## Zip filesystems and attached archives.

## Unix notifiers available using epoll() or kqueue()
  - relieves limits on file descriptors imposed by legacy select()

## Notable incompatibilities
  - Unqualified varnames resolved in current namespace, not global.
  - No --disable-threads build option.  Always thread-enabled.
  - I/O malencoding default response: raise error (-profile strict)
  - Windows platform needs Windows 7 or Windows Server 2008 R2 or later
  - Ended interpretation of ~ as home directory in pathnames
  - Removed the "identity" encoding.
  - Removed the encoding alias "binary" to "iso8859-1".
  - $::tcl_precision no longer controls string generation of doubles
  - Removed Tcl 7 legacies: [case], [puts] [read] variant syntaxes
  - Removed subcommands [trace variable|vdelete|vinfo]
  - No -eofchar option for channels anymore for writing.
  - On Windows 10+ (Version 1903 or higher), system encoding is always utf-8.
  - Removed command ::tcl::unsupported::inject.

## Incompatibilities in C public interface
  - Many arguments expanded type from int to Tcl_Size
  - Ended support for Tcl_ChannelTypeVersion less than 5
  - Introduced versioning of the Tcl_ObjType struct
  - Removed macros CONST*: Tcl 9 support means dropping Tcl 8.3 support
  - Removed routines:
>    Tcl_Backslash(), Tcl_*VA(), Tcl_*MathFunc*(), Tcl_MakeSafe(),
>    Tcl_(Save|Restore|Discard|Free)Result(), Tcl_EvalTokens(),
>    Tcl_(Get|Set)DefaultEncodingDir(),
>    Tcl_UniCharN(case)cmp(), Tcl_UniCharCaseMatch()

## New commands
  - `array default`, `array for`
  - `chan isbinary`
  - `coroinject`, `coroprobe`
  - `clock add weekdays`
  - `const`, `info const*`
  - `dict getwithdefault`
  - `file tempdir`, `file home`, `file tildeexpand`
  - `info commandtype`
  - `ledit`
  - `lpop`
  - `lremove`
  - `lseq`
  - `package files`
  - `string insert`, `string is dict`
  - `tcl::process`
  - `*::build-info`
  - `readFile`, `writeFile`, `foreachLine`

## New command options
  - `regsub ... -command ...`
  - `lsearch ... -stride ...`
  - `clock scan ... -validate ...`
  - `socket ... -nodelay ... -keepalive ...`
  - `vwait` controlled by several new options

## Numbers
  - 0NNN format is no longer octal interpretation. Use 0oNNN.
  - 0dNNNN format to compel decimal interpretation.
  - NN_NNN_NNN, underscores in numbers for optional readability
  - Functions: isinf() isnan() isnormal() issubnormal() isunordered()
  - `fpclassify`
  - Function int() no longer truncates to word size

## tcl::oo facilities
  - private variable and methods
  - `method -export`, `method -unexport`

Tk Changes Summary
-------------------

The source code for Tk is managed by fossil.  Tk developers coordinate all
changes to the Tk source code at

> [Tk Source Code](https://core.tcl-lang.org/tk/)

Release Tk 9.0b3 arises from the check-in with tag core-9-0-b3.

Highlighted differences between Tk 9.0 and Tk 8.6 are summarized below,
with focus on changes important to programmers using the Tk library and
writing Tcl scripts containing Tk commands.

## Many improvements to use of platform features and conventions.
  - Built-in widgets and themes are scaling-aware.
  - Improved support of two-finger gestures, where available
  - The `tk windowingsystem` "aqua" needs macOS 10.10 or later

## New commands and options
  - `tk sysnotify`: access to the OS notifications system
  - `tk systray`: access to the OS tray facility
  - `tk print`: access to the OS printing facility

## Widget options
  - New `ttk::progressbar` option: **-text**
  - `$frame ... -backgroundimage $img -tile $bool`
  - `$menu id`, `$menu add|insert ... ?$id? ...`
  - `$image get ... -withalpha ...`
  - All indices now accept the forms **end**, **end-int**, **int+|-int**

## Improved widget appearance
  - `ttk::notebook` with nondefault tab positions

## Images
  - Partial SVG support
  - Read/write access to photo image metadata

Tcl Improvement Proposals (TIPs)
--------------------------------

Each new user-visible feature in Tcl or Tk should find its origins in
a Tcl Improvement Proposal (TIP).  TIPs are published, edited, considered
and voted in public, and should contain valuable information about how
a feature came to be the way it is.  See the full collection here:

     https://tip.tcl-lang.org/

Additional support resources
----------------------------

See the following links for an accumulation of migration advice:

https://core.tcl-lang.org/tcl/wiki?name=Migrating+C+extensions+to+Tcl+9
https://core.tcl-lang.org/tcl/wiki?name=Migrating+scripts+to+Tcl+9

There has been much progress already porting many known applications,
extensions, and packages in the Tcl world to compatibility with Tcl/Tk 9:

https://wiki.tcl-lang.org/page/Apps+confirmed+to+work+with+Tcl+9
https://wiki.tcl-lang.org/page/Porting+extensions+to+Tcl+9

For additional information:
---------------------------

Please visit the Tcl Developer Xchange web site:

         https://www.tcl-lang.org/

This site contains a variety of information about Tcl/Tk in general, the
core Tcl and Tk distributions, Tcl development tools, and much more.

--
Tcl Core Team and Maintainers
Don Porter, Tcl Core Release Manager

-- 
| Don Porter            Applied and Computational Mathematics Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

Click on article to view the messages of the thread
Tcl/Tk 9.0b3 Release Candidates
Posted by Don Porter <donald.porter@nist.gov> 2 months ago
Last contribution 2 months ago 0
Now available at

https://sourceforge.net/projects/tcl/files/Tcl/9.0b3/

are RC1 candidate source code distribution pre-releases of Tcl 9.0b3
and Tk 9.0b3.

This is the second of a sequence of candidate releases leading to the
release of Tcl/Tk 9.0b3.  Testing of builds and operations on multiple
platforms is invited.  Open tickets on any problems discovered, or raise
the issue in a reply to this message.  The aim is to clean up the problems
that are easily discovered so that a broader audience receiving the
Tcl/Tk 9.0b3 release can focus attention on deeper issues needing beta
testing to discover.

The Thread package included with Tcl 9.0b3 is version Thread 3.0b4,
and includes bug fixes compared to prior bundled releases.  All other
bundled packages included with Tcl 9.0b3 are releases that have already
been included in some prior Tcl release.

Unless an unexpected severe problem is found with these release artifacts,
expect them to become the Tcl/Tk 9.0b3 releases on or around July 31, 2024.

Beta releases of Tcl/Tk 9.0 have been a great success at achieving a
growing circle of testing of the broad universe of Tcl/Tk programs.
Each one has brought up bugs and issues to be resolved, improving the
quality of Tcl/Tk 9.0. Spread the word.

Thank you for your contributions and assistance.

-- 
| Don Porter            Applied and Computational Mathematics Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

Click on article to view the messages of the thread
ANNOUNCE: cookfs 1.8.0
Posted by Konstantin Kushnir <chpock@gmail.com> 2 months 1 week ago
Last contribution 2 months ago 2
Replies:
  • neophytos@gmail.com (neophytos) replied 2 months ago
  • neophytos@gmail.com (neophytos) replied 2 months 1 week ago
Hi Everyone!

I am pleased to announce version 1.8.0 of cookfs.
Homepage and downloads are on github: https://github.com/chpock/cookfs

Please fill free to check/build/use it. Any feedback is welcome!

=====================================================================

Cookfs is a Tcl virtual filesystem using a compressed archive format to
allow embedding multiple files in an archive that Tcl scripts can
access directly.

It is optimized for storing Tcl packages (allowing around 10%-20%
smaller sizes ratio than mk4vfs while still using zlib compression),
small, fast and integrated with Tcl.

Major changes since the last public release:

1. Added support for strong AES-256-CBC encryption with
PBKDF2-HMAC-SHA256 key derivation. Cookfs supports 2 modes in which
either individual files or the encryption key can be encrypted. The
second mode will be very useful when the same archive needs to be
shared with different passwords. More details about these modes and how
to work with them is described in the documentation.
(http://cookfs.chpock.tk/cookfs.html#section10)

2. Added a C header file (tclCookfs.h) that is installed with the
package and contains a mount function and functions for configuring
mount parameters. These functions make it easier to integrate cookfs as
a file store for tclkit.

-- 
Best regards,
Konstantin Kushnir

Click on article to view the messages of the thread
ANNOUNCE: tDOM 0.9.4
Posted by Rolf Ade <rolf@pointsman.de> 2 months 1 week ago
Last contribution 2 months 1 week ago 1
Replies:
  • neophytos@gmail.com (neophytos) replied 2 months 1 week ago
tDOM 0.9.4 works with Tcl 8.5, 8.6 and 9.0.

The migration to Tcl 9 is the main point of this release.

Other works include:

- Updated  expat (2.6.2) and TEA.

- Better HTML 5 entities support with the -simple parser

- More flexibility of dom clearString

- Cascading XPath 1.0 expressions.

See the CHANGES files in the top-level directory of the source
distribution for a more detailed list, and the timeline of the official
tDOM repository at http://tdom.org for a complete list of changes.

For downloads and other information see the README below. Bare access at
http://tdom.org/downloads/

rolf

The README follows:


## tDOM - a XML / DOM / XPath / XSLT / HTML / JSON implementation for Tcl
### Version 0.9.4

### tDOM contains:

   *  for convenience expat 2.6.2, the XML parser originated from
      James Clark, although you're able to link tDOM with other
      expat versions or the library provided by the system.

   *  building a DOM tree from XML in one go implemented in C for
      maximum performance and minimum memory usage, and DOM I and II
      methods to work on such a tree using either a OO-like or a
      handle syntax.

   *  a Tcl interface to expat for event-like (SAX-like) XML parsing.

   *  a complete, compliant and fast XPath implementation in C
      following the November 99 W3C recommendation for navigating and
      data extraction.

   *  a fast XSLT implementation in C following the W3C Recommendation
      16 November 1999.
   
   *  optional DTD validation.

   *  a rich and Tcl'ish language to describe structures and text
      content and to validate XML data or DOM trees or other forms of
      hierarchically data with that.
   
   *  a JSON parser which parses any possible JSON input into a DOM
      tree without losing information.

   *  an efficient and Tcl'ish way to create XML and HTML documents
      and JSON strings.

   *  as build option an interface to the gumbo HTML5 parser, which
      also digests almost any other HTML.

   *  an even faster simple XML parser for trusted XML input.

   *  a slim Tcl interface to use expat as pull-parser.

   *  a secure way to share DOM trees by threads

   *  additional convenience methods.

   *  and more.


### Documentation

The documentation is included into the source distribution in HTML and
man format. Alternatively, read it
[online](http://tdom.org/index.html/doc/trunk/doc/index.html).


### Getting the code

The development repository is hosted at <http://tdom.org> and is
mirrored at <http://core.tcl.tk/tdom>. You are invited to use trunk
which you get as
[tarball](http://tdom.org/index.html/tarball/trunk/tdom-trunk.tar.gz)
or as [zip archive](http://tdom.org/index.html/zip/trunk/tdom-trunk.zip)

The latest release is 0.9.4. Get the source code as
[tarball](http://tdom.org/downloads/tdom-0.9.4-src.tgz) or
as [zip archive](http://tdom.org/downloads/tdom-0.9.4-src.zip).

Windows binaries of the 0.9.4 release are also available. Get it for
[Tcl 8.6 / 64 bit](http://tdom.org/downloads/tdom-0.9.4-windows-x64.zip) or [Tcl 8.6
/ 32 bit](http://tdom.org/downloads/tdom-0.9.4-windows-x86.zip) or
[Tcl 9 / 64 bit](http://tdom.org/downloads/tcl9-tdom-0.9.4-windows-x64.zip)
or [Tcl 9 / 32 bit](http://tdom.org/downloads/tcl9-tdom-0.9.4-windows-x86.zip)

The provided windows binaries include (statically linked) the
HTML5 parser.


### Compiling tdom

Depending on your platform (unix/mac or win), go to the
corresponding directory and invoke the configure script:

    ../configure
    make 
    make test
    make install

Alternatively, you can build the tDOM package in just about any
directory elsewhere on the filesystem (since TEA-compatible).

You might also want to do "../configure --help" to get a list of
all supported options of the configure script. In the "unix"
directory there is a "CONFIG" file containing some examples on how
to invoke the "configure" script for some common cases. You can
peek there. This file also includes a short description of the
tDOM specific configure options.

Since tDOM is TEA-compatible you should be able to build it using
the MinGW build environment for Windows. There is also the MSVC
nmake file so you can compile the package with Microsoft tools.
Refer to the README in the win directory for more details about
building on Windows.

The compile process will build the tDOM shared library suitable for
loading into the Tcl shell using standard "package require" mechanism.


### Reporting bugs

Open a [ticket](http://tdom.org/index.html/ticket). Log in as
anonymous and report your findings. If you prefer to have an
individual login write Rolf a mail.


### History

tDOM was started by Jochen Loewer (loewerj@hotmail.com) and
developed by Jochen and Rolf Ade (rolf@pointsman.de) with
contributions by Zoran Vasiljevic (zv@archiware.com). Since more
than a dozen years it is maintained and developed by Rolf Ade.


### ... ahh, Licensing!!

Sigh. See LICENSE file.

Click on article to view the messages of the thread
2GB limitation
Posted by alexandru.dadalau@meshparts.de (alexandru) 2 months 1 week ago
Last contribution 2 months 1 week ago 7
Replies:
  • Emiliano <emiliano@example.invalid> replied 2 months 1 week ago
  • Andreas Leitgeb <avl@logic.at> replied 2 months 1 week ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 1 week ago
  • Emiliano <emiliano@example.invalid> replied 2 months 1 week ago
  • Rich <rich@example.invalid> replied 2 months 1 week ago
  • alexandru.dadalau@meshparts.de (alexandru) replied 2 months 1 week ago
  • Andreas Leitgeb <avl@logic.at> replied 2 months 1 week ago
Hi,

Will there be a fix for the 2GB size limit that a string representation
have in Tcl?
Maybe already fixed in Tcl 9.0?

Thanks
Alexnadru

Click on article to view the messages of the thread
ANNOUNCE: tclexecomp V2.0.0 released
Posted by Michael Niehren <michael@niehren.de> 2 months 1 week ago
Last contribution 2 months 1 week ago 0
I'm pleased to announce release V2.0.0 of tclexecomp, a TCL executable
wrapper.

What is new in V2.0.0
----------------------

As V2.0.0 suggest, there has been an complete rewrite of the code.
The storage format is switched from the old zvfs (which also freewarp uses)
to cookfs. At this point many thanks to Konstantin Kushnir for the
reactivation and extension of this very nice module.

The switch to cookfs brings an file size reduction of about 20% and an
4 times faster starting time, especially on the Windows platform.

Currently the used cookfs is unencrypted, so if you need to protect your
code you should bytecompile it before wrapping (Call tclexecmop with the
-compile option). If Konstantin finished his work on encryption on cookfs,
i will release a new version with that feature included.

The 2. major feature is the integration of CloudTk into tclexecomp. Here
also many thanks to Jeff Smith for the great CloudTk-Code. It is now very
easy to bring your TclTk-Application onto the Browser. You only need a
running Linux-System (x86_64 or arm32, Raspi) with Xvnc installed.

Besides these new features there have been updates of the following modules:
--------------------------------
 1. Update Tcl/Tk to V8.6.16
 2. Update bwidget to V1.9.16
 3. Update img to V1.4.14
 4. Update mentry to V4.2
 5. Update scrollutil to V2.2
 6. Update tablelist to V7.2
 7. Update wcb to V4.0

About
-----
tclexecomp is a TCL exectutable wrapper, which creates a single executable
file from a tcl script. Currently it can create binaries for Linux (64 Bit),
Linux (32 Bit, Arm, Raspi), Windows (64 Bit) and MACOS (64 Bit).

Main Features are
- Create executable Binaries from an TclTk-Script for Linux, Windows and
MacOS
- Compile a Tcl program to bytecode
- Customize the Binaries to the needed modules of the Application
- Run your TclTk-Application in the Browser (CloudTk)

You can also use it as a normal Tcl/Tk-Interpreter.

More information on the Homepage (https://tclexecomp.sourceforge.net).

Any feedback is very welcome !!!

Click on article to view the messages of the thread
bug in sdx kit?
Posted by saito <saitology9@gmail.com> 2 months 2 weeks ago
Last contribution 2 months 2 weeks ago 7
Replies:
  • greg <gregor.ebbing@gmx.de> replied 2 months 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 2 weeks ago
  • saito <saitology9@gmail.com> replied 2 months 2 weeks ago
  • greg <gregor.ebbing@gmx.de> replied 2 months 2 weeks ago
  • saito <saitology9@gmail.com> replied 2 months 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 2 weeks ago
I wanted to use sdx kit on my chrono-timer script (whose source is 
available on the wiki). However, it kept generating errors indicating 
problems with rsync not being able to delete some files.

It turns out that you can't have a dot file in a wrapped app. In other 
words, no ".file" or ".folder" or it will complain and error out.

I can't find more info on sdx.kit so I wonder if this is some sort of a 
feature or if it is indeed a bug.

Click on article to view the messages of the thread
How to speed up a script by threading?
Posted by Mark Summerfield <mark@qtrac.eu> 2 months 2 weeks ago
Last contribution 2 months 2 weeks ago 3
Replies:
  • saito <saitology9@gmail.com> replied 2 months 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 2 weeks ago
  • Ralf Fassel <ralfixx@gmx.de> replied 2 months 2 weeks ago
The program below (~95 LOC) is very slow.
One way to speed it up would be to process each directory given on the 
command line in its own thread.
But I can't see how to do this.
Or is there a better way to make it faster?
I'm using Tcl/Tk 9.0b2 on Linux.

#!/usr/bin/env tclsh9

package require fileutil 1

namespace eval ef {}

proc ef::main {} {
    lassign [read_args] patterns dirs debug ;# may not return
    if {$debug} {
        puts "globs='$patterns'"
    }
    set filenames [list]
    foreach dir $dirs {
        if {$debug} {
            puts "folder='$dir'"
        }
        foreach filename [fileutil::findByPattern $dir $patterns] {
            lappend filenames $filename
        }
    }
    foreach filename [lsort $filenames] {
        puts $filename
    }
}

proc ef::read_args {} {
    set what ""
    set dirs [list]
    set debug false
    foreach arg $::argv {
        switch $arg {
            -h -
            --help {usage}
            -D -
            --debug {set debug true}
            default {
                if {$what eq ""} {
                    set what $arg
                } else {
                    lappend dirs $arg
                }
            }
        }
    }
    if {$what eq ""} {
        usage
    }
    set patterns [get_patterns $what]
    if {![llength $dirs]} {
        lappend dirs .
    }
    return [list $patterns $dirs $debug]
}

proc ef::usage {} {
    puts $::USAGE
    exit 1
}

proc ef::get_patterns what {
    if {[string index $what 0] ne "."} {
        return "*$what*"
    }
    set patterns [list *$what]
    switch $what {
        .c {lappend patterns *.h}
        .c++ {lappend patterns *.h *.hxx *.hpp *.h++ *.cxx *.cpp}
        .cpp {lappend patterns *.h *.hxx *.hpp *.h++ *.cxx *.c++}
        .tcl {lappend patterns *.tm}
        .py {lappend patterns *.pyw}
    }
    return $patterns
}

const USAGE {usage: efind.tcl [options] <what> [dir1 [dir2 …]]

options:
-h, --help      Show this usage message and quit.
-D, --debug     Show pattern and folders being processed.

Searches for files that match \"what\" in . or in any specified
folders, including recursively into subfolders.
\"what\" is either \".ext\" or text, e.g., .tcl or .py; or go.mod;
for .tcl searches *.{tcl,tm}, for .py *.{py,pyw}, for .c *.{c,h}
for .cpp or .c++ *.{h,hxx,hpp,h++,cxx,cpp,c++}; others as is.}

ef::main

Click on article to view the messages of the thread
how to use diagram-viewer and the diagram pkg
Posted by Mark Summerfield <mark@qtrac.eu> 2 months 2 weeks ago
Last contribution 2 months 2 weeks ago 5
Replies:
  • Andreas Leitgeb <avl@logic.at> replied 2 months 2 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 2 weeks ago
  • Andreas Leitgeb <avl@logic.at> replied 2 months 2 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 2 weeks ago
I would like to try out the diagram-viewer app and the diagram pkg.
I am using Tcl/Tk 9.0b2 on Linux.

Given file /tmp/a.dia (copied from the tclwiki):

box A
arrow "" 40
circle B
direction SE

I tried this at the command line:

$ wish9 ~/opt/tcl9/bin/diagram-viewer show /tmp/a.dia 
Creating safe environment, please wait...
/home/mark/opt/tcl9/bin/diagram-viewer: can't find package diagram
$ wish9
% package require diagram
1

As you can see, diagram-viewer can't find the diagram package even though 
it is there.

Nor can I find any other examples of the diagram language nor what file 
extension one should use.

Click on article to view the messages of the thread
Differing namespace behavior in Tcl 9.0b2
Posted by Andrew Mangogna <amangogna@modelrealization.com> 2 months 2 weeks ago
Last contribution 2 months 2 weeks ago 5
Replies:
  • Andrew Mangogna <amangogna@modelrealization.com> replied 2 months 2 weeks ago
  • Andreas Leitgeb <avl@logic.at> replied 2 months 2 weeks ago
  • Ashok <apnmbx-public@yahoo.com> replied 2 months 2 weeks ago
  • Ashok <apnmbx-public@yahoo.com> replied 2 months 2 weeks ago
  • et99 <et99@rocketship1.me> replied 2 months 2 weeks ago
I have been out of the Tcl loop for a while, but have been porting an old 
"C" based extension of mine to Tcl 9.0b2. The port went well, required 
very few changes, but I have some differing behavior that I'm trying to 
track down. The package consists of an ensemble command, "ral" which
has three subcommands implemented in the "::ral" namespace. Each of
the subcommands is also exported from the namespace. The following shows 
the problems:

For Tcl 8.6:

% info patchlevel
8.6.11
% package require ral
0.12.2
% info commands ral
ral
% namespace export
% ral relvar names
% relvar names
invalid command name "relvar"  <- expected
% namespace import ::ral::*
% relvar names
% namespace export
% 

For Tcl 9.0b2:

% info patchlevel
9.0b2
% package require ral
0.13.0                      <- new port to Tcl 9
% info commands ral
ral
% namespace export
tuple relation relvar       <- unexpected -- ral exports these commands
                            <- but they shouldn't appear in the global
                            <- namespace
% ral relvar names
% relvar names
invalid command name "relvar" <- expected, just as Tcl 8.6
% namespace import ::ral::*
% relvar names
invalid command name "relvar" <- unexpected
% namespace export
tuple relation relvar         <- again, not sure why these appear

So my question is, "Is there some namespace / ensemble changes that I've 
not been able to track down?" It appears that the ensemble works 
correctly, but that the exported commands are no longer exported or 
available.

Thanks,

Andrew Mangogna

Click on article to view the messages of the thread
A TclOO question
Posted by Helmut Giese <hgiese@ratiosoft.com> 2 months 2 weeks ago
Last contribution 2 months 2 weeks ago 0
Hello out there ,
I found XOTclLight (https://github.com/xdobry/xotcl-light ) which is
an XOTcl compatible implementation via TclOO. My hope was that with it
XOTcl's mysterious error messages would be traceable since the calls
wouldn't be buried in XOTcl's binary.
Alas, it errored out with
	may not change classes into an instance of themselves
on the line
	oo::objdefine Class class Class

While this intuitively makes sense I wonder:
1) Maybe TclOO's syntax has changed since then (2015)? After all, a
man who knows enough about OO systems to implement one in terms of the
other isn't likely to release a package which is evidently unusable.
2) What does the statement cited above try to achieve? And, most
important, what magic can achieve it?

I figured that it attempted to replace the XOTcl command 'Class' with
its own definition so I changed in the script and the call above
'Class'  to 'NewClass' - but to no avail.

Any idea or help will be greatly appreciated
Helmut

Click on article to view the messages of the thread
The "Tcl and the Tk Toolkit" book
Posted by Mark Summerfield <mark@qtrac.eu> 2 months 3 weeks ago
Last contribution 2 months 2 weeks ago 2
Replies:
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 2 weeks ago
  • Andreas Leitgeb <avl@logic.at> replied 2 months 2 weeks ago
The excellent book "Tcl and the Tk Toolkit" 2nd edition covers Tcl/Tk 8.5.

I know that Professor Ousterhout isn't planning a 3rd edition, but I 
wondered if someone else was?

It would be great to have a new edition that covered all the new things 
added in 8.6 and 9.0 (esp. OO), and ideally also at least introduced 
Tcllib and Tklib (which I don't think the original book covers).

Click on article to view the messages of the thread
Tklib's tooltip poss bug in method although fine in a function
Posted by Mark Summerfield <mark@qtrac.eu> 2 months 3 weeks ago
Last contribution 2 months 2 weeks ago 13
Replies:
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 2 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 2 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 2 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 2 weeks ago
  • undroidwish <undroidwish@googlemail.com> replied 2 months 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 2 weeks ago
  • greg <gregor.ebbing@gmx.de> replied 2 months 2 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 2 weeks ago
  • undroidwish <undroidwish@googlemail.com> replied 2 months 2 weeks ago
  • undroidwish <undroidwish@googlemail.com> replied 2 months 2 weeks ago
  • greg <gregor.ebbing@gmx.de> replied 2 months 3 weeks ago
In the script below, clicking button two works fine, but even hovering 
over button One produces an error (shown at the end).

The difference is that button one's tooltip is created in a method and 
button two's tooltip is created in a function. If you comment out button 
one's tooltip, the button works fine just like button two. I'm using Tcl/
Tk 9.0b2 on Linux.

#!/usr/bin/env wish9

package require tooltip
package require widget::toolbar

if {[info exists env(TK_SCALING)]} {tk scaling $env(TK_SCALING)}

proc main {} {
    tk appname "Tooltip Bug?"
    set application [App new]
    $application show
}

namespace eval toolbar {}

proc toolbar::add_two app {
    .toolbar add [ttk::button .toolbar.two -text Two \
        -command [list $app on_two]]
    ::tooltip::tooltip .toolbar.two "Two works fine"
}

oo::class create App {}
oo::define App {
    constructor {} {
        wm withdraw .
        wm title . [tk appname]
        widget::toolbar .toolbar
        my add_one
        toolbar::add_two [self]
        pack .toolbar
        bind . <Escape> {destroy .}
    }
    method add_one {} {
        .toolbar add [ttk::button .toolbar.one  -text One \
            -command [callback on_one]]
        ::tooltip::tooltip .toolbar.one "One fails on tooltip" ;# BUG
    }
    method on_one {} { puts "on_one" }
    method on_two {} { puts "on_two" }
    method show {} { wm deiconify . ; raise . }
}

main


Here is the bug that arises when hovering over button one. Note that if 
you comment out the ";# BUG" line, button one works fine.

self may only be called from inside a method
self may only be called from inside a method
    while executing
"self "
    ("uplevel" body line 1)
    invoked from within
"uplevel 2 { self }"
    (procedure "PackageNamespaceGet" line 17)
    invoked from within
"PackageNamespaceGet"
    (procedure "::msgcat::mc" line 2)
    invoked from within
"::msgcat::mc {One fails on tooltip}"
    (in namespace eval "::oo::Obj69" script line 1)
    invoked from within
"namespace eval $nscaller [list ::msgcat::mc $text {*}$msgargs]"
    (procedure "show" line 22)
    invoked from within
"show .toolbar.one {{One fails on tooltip} {} {} ::oo::Obj69 {} {}} 
cursor"
    (in namespace inscope "::tooltip" script line 1)
    invoked from within
"::namespace inscope ::tooltip {show .toolbar.one {{One fails on tooltip} 
{} {} ::oo::Obj69 {} {}} cursor}"
    ("after" script)

Click on article to view the messages of the thread
Can Tcl/Tk be used to create Xfce panel apps?
Posted by Mark Summerfield <mark@qtrac.eu> 2 months 3 weeks ago
Last contribution 2 months 3 weeks ago 7
Replies:
  • greg <gregor.ebbing@gmx.de> replied 2 months 3 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 3 weeks ago
  • Luc <luc@sep.invalid> replied 2 months 3 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 3 weeks ago
  • greg <gregor.ebbing@gmx.de> replied 2 months 3 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 3 weeks ago
  • Luc <luc@sep.invalid> replied 2 months 3 weeks ago
I'd quite like to create a panel app for the Xfce panel. (I know that Tcl/
Tk can create systray apps, but I want a panel button like "Launcher")

Click on article to view the messages of the thread
How to do callbacks to methods
Posted by Mark Summerfield <mark@qtrac.eu> 2 months 3 weeks ago
Last contribution 2 months 3 weeks ago 3
Replies:
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 3 weeks ago
  • greg <gregor.ebbing@gmx.de> replied 2 months 3 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 3 weeks ago
In the app below none of the callbacks works, neither in the bind calls 
nor the -command. I am using Tcl/Tk 9.0b2 on Linux. How can I make these 
callbacks work?

#!/usr/bin/env wish9
tk appname "Test App"
oo::class create App {
    constructor {} {
        wm withdraw .
        wm title . [tk appname]
        grid [ttk::button .quitButton -text Quit -underline 0 \
              -command {my on_quit}]
        bind <Escape> {my on_quit}
        bind <Alt-q> {my on_quit}
    }
    method on_quit {} {
        destroy .
    }
    method show {} {
        wm deiconify .
        raise .
    }
}
set application [App new]
$application show

Click on article to view the messages of the thread
How to pass an object from inside its own method to a helper function
Posted by Mark Summerfield <mark@qtrac.eu> 2 months 3 weeks ago
Last contribution 2 months 3 weeks ago 4
Replies:
  • Ralf Fassel <ralfixx@gmx.de> replied 2 months 3 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 3 weeks ago
  • Schelte <nospam@wanadoo.nl> replied 2 months 3 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 3 weeks ago
I want to pass an object from inside its own method to a helper function. 
(I'd also like to know how to pass a bound method.)

In the example below I have tried using [self] and [self object] and [self 
namespace] but none of them works.

#!/usr/bin/env wish9
tk appname "Test App"
proc make_file_menu {app} {
    .menu.file add command -command {$app on_quit} -label Quit \
            -underline 0 -accelerator Ctrl+Q
}
oo::class create App {
    constructor {} {
        wm withdraw .
        wm title . [tk appname]
        grid [ttk::button .quitButton -text Quit -underline 0 \
              -command [callback on_quit]]
        bind . <Escape> [callback on_quit]
        bind . <Alt-q> [callback on_quit]
        menu .menu
        menu .menu.file
        .menu add cascade -menu .menu.file -label File -underline 0
        make_file_menu [self] ;# BUG what do I pass here as "this"
        . configure -menu .menu
    }
    method on_quit {} {destroy .}
    method show {} {
        wm deiconify .
        raise .
    }
}
set application [App new]
$application show

The error I get is:

can't read "app": no such variable
    while executing
"$app on_quit"
    invoked from within
".#menu.#menu#file invoke active"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke active]"
    (procedure "tk::MenuInvoke" line 49)
    invoked from within
"tk::MenuInvoke .#menu.#menu#file 1"
    (command bound to event)

Click on article to view the messages of the thread
Operate only on the visible lines in a text window
Posted by Shaun Deacon <sdeacon@us.socionext.com> 2 months 3 weeks ago
Last contribution 2 months 3 weeks ago 4
Replies:
  • Shaun Deacon <sdeacon@us.socionext.com> replied 2 months 3 weeks ago
  • Ralf Fassel <ralfixx@gmx.de> replied 2 months 3 weeks ago
  • clt.to.davebr@dfgh.net replied 2 months 3 weeks ago
  • et99 <et99@rocketship1.me> replied 2 months 3 weeks ago
My application uses a text widget to display chip 'test vectors' from a 
loaded file. Each vector occupies a line - for example :

0011010XXLLLHH
0100110XXLHHLH
....
0110110XXHHHHH

A highlighting operation colors specified values (for example all 1's) 
for all lines of text in the widget. For small and medium sized files 
this is fine. However, test files can often be large (over 500,000 
vectors). The highlight operation applied to all lines is too slow in 
this case - the vectors are much longer strings in real life too.

The obvious solution to me is to just highlight the currently visible 
lines (or a range of lines spanning the current view - say 1000 or so) 
and when the user scrolls the window, highlight the new set of lines.

Suggestions on the best way to find the indexes for the currently 
visible lines when the widget has been scrolled would be great.

Can someone please point me in the right direction ?

For some reason, I can't seem to find what I'm looking for in CLT, the 
wiki or the man pages.

thanks
Shaun

Click on article to view the messages of the thread
Tk 9: image -format svg -scaletowidth not working?
Posted by Mark Summerfield <mark@qtrac.eu> 2 months 3 weeks ago
Last contribution 2 months 3 weeks ago 8
Replies:
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 3 weeks ago
  • nemethi <csaba.nemethi@t-online.de> replied 2 months 3 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 3 weeks ago
  • nemethi <csaba.nemethi@t-online.de> replied 2 months 3 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 3 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 3 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 3 weeks ago
  • Ralf Fassel <ralfixx@gmx.de> replied 2 months 3 weeks ago
I am trying to use the -format svg -scaletowidth option without success.

Given this svg file "test.svg" (copied from W3CSchools):

<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
   <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" 
fill="yellow" />
</svg> 

This program works fine:

#!/usr/bin/env wish9
proc icon {svg {width 0}} {
    set opt [expr {$width ? "-format svg -scaletowidth $width" : ""}]
    image create photo -file $svg {*}$opt
}
ttk::button .button -command {destroy .} -image [icon test.svg]
grid .button

But if I want to scale the image to 24 pixels (e.g., for a menu item):

#!/usr/bin/env wish9
proc icon {svg {width 0}} {
    set opt [expr {$width ? "-format svg -scaletowidth $width" : ""}]
    image create photo -file $svg {*}$opt
}
ttk::button .button -command {destroy .} -image [icon test.svg 24]
grid .button

It fails with this error:

Error in startup script: unknown option "-scaletowidth"
    while executing
"image create photo -file $svg {*}$opt"
    (procedure "icon" line 3)
    invoked from within
"icon test.svg 24"
    invoked from within
"ttk::button .button -command {destroy .} -image [icon test.svg 24]"
    (file "./svgtest2.tcl" line 8)

Can someone tell me what I'm doing wrong?

I'm using Tcl/Tk 9.0b2 on Debian Linux.

Click on article to view the messages of the thread
poss minor doc error + minor doc suggestion
Posted by Mark Summerfield <mark@qtrac.eu> 2 months 3 weeks ago
Last contribution 2 months 3 weeks ago 3
Replies:
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 3 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 3 weeks ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 2 months 3 weeks ago
*Poss doc error*

Page: https://www.tcl.tk/man/tcl9.0/TclCmd/define.html#M55
This is the examples section.
In the example that begins with the line:

  oo::class create DBTable {

The interactive output reported at the end looks slightly wrong. For 
example, it shows:

    set u1 [Users insert "username=abc"]
        → DB: create row from ::Users matching username=abc

but I was expecting:

    set u1 [Users insert "username=abc"]
        → DB: create row in ::Users matching username=abc

This also applies to the 'set u2' example that follows.

*Doc suggestion*

Page: https://www.tcl.tk/man/tcl9.0/TclCmd/configurable.html#M5
This is the description section.

I suggest adding a sentence something like:

    Note that oo::configurable classes can only be mixed in (using 
`mixin`) with _other_ oo::configurable classes, not with plain oo::class 
classes.

The reason for suggesting this is that I tried mixing in an oo::class with 
an oo::configurable and got a very confusing "unknown method "configure":" 
error message.

Click on article to view the messages of the thread
OpenACS/Tcl/Tk conference: programme and video streams
Posted by Colin Macleod <user7@cmacleod.me.uk.invalid> 2 months 3 weeks ago
Last contribution 2 months 3 weeks ago 0
The OpenACS and Tcl/Tk Conference 2024 will take place this Thursday 11th and Friday 12th July.
The programme can be seen at https://openacs.org/conf2024/info/schedule .
There will be a live video stream at https://openacs.org/conf2024/info/stream .

-- 
Colin Macleod.

Click on article to view the messages of the thread
oo::class - my variable vs variable
Posted by Mark Summerfield <mark@qtrac.eu> 3 months ago
Last contribution 2 months 3 weeks ago 7
Replies:
  • et99 <et99@rocketship1.me> replied 2 months 3 weeks ago
  • greg <gregor.ebbing@gmx.de> replied 2 months 3 weeks ago
  • et99 <et99@rocketship1.me> replied 2 months 3 weeks ago
  • Mark Summerfield <mark@qtrac.eu> replied 2 months 4 weeks ago
  • greg <gregor.ebbing@gmx.de> replied 2 months 4 weeks ago
  • Schelte <nospam@wanadoo.nl> replied 2 months 4 weeks ago
  • Petro Kazmirchuk <vivid.tree7955@fastmail.com> replied 2 months 4 weeks ago
I am trying to learn TclOO. I have created two classes P and Q which 
appear to have identical behavior. Class P uses "my variable" and Q uses 
"variable". Can someone explain the difference between them. (I am 
familiar with Python and Go if that's any help with explaining.)

oo::class create P {
    constructor {{x 0} {y 0}} {
        my variable x_
        my variable y_
        set x_ $x
        set y_ $y
    }

    method x {} {
        my variable x_
        return $x_
    }

    method set_x {x} {
        if {![string is integer -strict $x]} {
            throw NOT_AN_INT "x must be an int not \"$x\""
        }
        my variable x_
        set x_ $x
    }

    method y {} {
        my variable y_
        return $y_
    }
}

oo::class create Q {
    constructor {{x 0} {y 0}} {
        variable x_
        variable y_
        set x_ $x
        set y_ $y
    }

    method x {} {
        variable x_
        return $x_
    }

    method set_x {x} {
        if {![string is integer -strict $x]} {
            throw NOT_AN_INT "x must be an int not \"$x\""
        }
        variable x_
        set x_ $x
    }

    method y {} {
        variable y_
        return $y_
    }
}

puts "P"
set p1 [P new]
puts "p1 x=[$p1 x] y=[$p1 y]"
$p1 set_x 5
puts "p1 x=[$p1 x] y=[$p1 y]"
try {$p1 set_x "invalid"} trap {} err { puts $err }
set p2 [P new 0 -8]
puts "p2 x=[$p2 x] y=[$p2 y]"
$p2 set_x 17
puts "p2 x=[$p2 x] y=[$p2 y]"
puts "p1 x=[$p1 x] y=[$p1 y]"

puts "Q"
set q1 [Q new]
puts "q1 x=[$q1 x] y=[$q1 y]"
$q1 set_x 5
puts "q1 x=[$q1 x] y=[$q1 y]"
try {$q1 set_x "invalid"} trap {} err { puts $err }
set q2 [Q new 0 -8]
puts "q2 x=[$q2 x] y=[$q2 y]"
$q2 set_x 17
puts "q2 x=[$q2 x] y=[$q2 y]"
puts "q1 x=[$q1 x] y=[$q1 y]"

Click on article to view the messages of the thread
July 9 2024 Tcl monthly virtual meetup notice
Posted by steve@digitalsmarties.com (stevel) 2 months 3 weeks ago
Last contribution 2 months 3 weeks ago 0
A reminder that the July Tcl virtual meetup will be  held Tuesday July
9th 2024 at [clock format 1720573200] - Tuesday 6pm US West, 8pm US
Central, 9pm US East, Wednesday 1am UTC, 2am UK, 3am Western Europe,
6:30am India, 9am Australia West / Singapore / China, 10am Japan, 11am
Australia East, 1pm New Zealand

Details (including how to connect) are available via
https://wiki.tcl-lang.org/page/Monthly+Virtual+Meetup

Click on article to view the messages of the thread
Announcing filebrowse 0.1, beta
Posted by Luc <luc@sep.invalid> 2 months 4 weeks ago
Last contribution 2 months 4 weeks ago 0
Not only buggy but rather unfinished. Just a preview to invite comments
in case anyone is interested. Your suggestions may make their way into=20
the next version. Probably too early to point out bugs. I'm aware of=20
most of them.

https://sourceforge.net/projects/filebrowse/

filebrowse =E2=80=94 Tk widget for listing the contents (files and director=
ies)=20
of directories.

This package/command creates a Tk widget for listing and browsing files=20
and directories inside a directory. It doesn't return anything, but it=20
runs entirely within the ::filebrowse namespace and creates the=20
::filebrowse::selection variable which always contains a list with the=20
full path of all selected files and directories. That list is updated in=20
real time. The widget must be called from within a Tcl/Tk application and=20
the call may specify these options: please see filebrowse.html in the same=
=20
directory or archive where you obtained this README.md file.

I intend to make the next release 1.0.

--=20
Luc
>>

Click on article to view the messages of the thread
tclhttpd logs
Posted by saito <saitology9@gmail.com> 3 months ago
Last contribution 3 months ago 4
Replies:
  • saito <saitology9@gmail.com> replied 3 months ago
  • Colin Macleod <user7@cmacleod.me.uk.invalid> replied 3 months ago
  • saito <saitology9@gmail.com> replied 3 months ago
  • Colin Macleod <user7@cmacleod.me.uk.invalid> replied 3 months ago
I wonder if anyone is familiar with tclhttpd log entries and can shed 
some light on this:

Typically each log entry contains a bunch of attributes including the ip 
address, a timestamp, the requested url, user agent, http code, etc. 
But I am seeing an increasing number of weird entries where most of that 
info is empty. The lines only include the ip address and the timestamp, 
and the rest is just "- - - - -".

What does this mean?

Click on article to view the messages of the thread
Major update to the macOS port of Tk
Posted by steve@digitalsmarties.com (stevel) 3 months ago
Last contribution 3 months ago 0
Posted on behalf of Marc Culler, there is a major update to the macOS
port of Tk available for testing.

---

Tk Timeline watchers may have noticed a long chain of commits to the
cgimage_with_crossing branch over the last month.  This announcement is
to explain what has been going on there.  In brief, that branch contains
a major change to how drawing works in the macOS port of Tk.  This
change makes drawing in the macOS port work in a way which is much
closer to how it works in the other platforms, and much closer to what
the generic Tk code expects. The result is better performance and
increased stability.

The work is based on an idea of Christopher Chavez's.  He realized that
Apple's Appkit design allowed for an alternative drawing strategy, and
wrote a proof-of-concept implementation.  I had created a branch
containing his implementation a couple of years ago.  Recently I (Marc)
merged that branch with Tk 9 and then spent a few weeks ironing out
wrinkles.  Nicolas Bats, Torsten Berg, Steve Landers, and Kevin Walzer
kindly offered to help me by testing the new implementation on their
apps, some of which provide very challenging environments for Tk.  The
result of this work is in the cgimage-with-crossing branch.  (The branch
also includes a fix for ticket [22349fc78a] which is about <Enter> and
<Leave> events - hence the reference to crossing in the branch tag.)

The five of us are confident that this is a significant improvement.
Some highlights are:
    * Better performance - CPU-intensive apps use about 20% fewer CPU
cycles
    * Better conformance - Most runs of the regression test suite on
macOS 14 show no failures.  This is not close to being the case for the
trunk branch.
    * Fewer graphical artifacts (and work continues on those that
remain.)
    * Fewer crashes (none that we know of at the moment.)

Given that the branch has been tested on large and complex apps - all of
which are working well - this is a major step forwards and we’d like to
see it tested more widely.  To that end, although we are late in the
release cycle we are comfortable recommending that this be merged into
trunk and made part of beta3.  That’s the only way we can guarantee
wider testing. Of course, if any issues crop up they will be addressed
in a timely manner.  If you are a macOS tkchat user please download and
try https://www.codebykevin.com/TkChat_Setup_1.5.2.dmg   If you want to
try the new macOS Tk with your own code and are comfortable building it
yourself please checkout and build the Tk cgimage_with_crossing branch

The rest of this message gives some more details about the changes.

The main difference is that the new drawing strategy does away with the
asynchronous drawing via the drawRect method.  A macOS app which uses
drawRect is supposed to do all of its drawing within the drawRect
method, which can only be called by the NSApplication object.  The app
can request that drawRect be called by setting the viewNeedsDisplay
flag, but can not call drawRect.  The original design of the macOS Aqua
port only partially complied with this strategy.  In fact it was
possible to obtain a valid graphics context for drawing to the backing
layer of a window's contentView even outside of the drawRect method. 
The original port would do this, e.g. in a widget display proc which is
being run as an idle task.  But it would also draw in the drawRect
method by first generating expose events for all widgets that need
updates, then processing those expose events to create idle tasks, then
processing all of those idle tasks immediately.

Obviously this scheme was not what Tk expected.  Nor was it what Apple
expected.  And Apple put an abrupqt end to half of it with the release
of macOS Mojave, which made it impossible to obtain a valid graphics
context outside of the drawRect method. When Tk was first built on
Mojave, it produced nothing but totally black windows.  Eventually this
was worked around by arranging that any drawing operation which failed
due to an invalid graphics context would be rescheduled and also to
modify drawRect to make it (attempt to) run all of those rescheduled
idle tasks.

With the new macOS code it is once again true that Tk always has a valid
graphics context available and hence can draw at any time.  It draws
into a CGBitmapImageContext which serves as the backing store for a Tk
Window.  Instead of calling drawRect, it is configured with Apple's
other option which is to call updateLayer instead.  In the new setup
updateLayer installs the CGImage as the CALayer of the ContentView of
the NSWindow which hosts the Tk toplevel, causing the contents of the
image to appear in the window.  It also creates a new CGImage containing
a copy of the window in which subsequent drawing operations take place. 
This allows drawing operations to take place at the expected time and in
the expected order.  That makes for better stability and less
unpredictability.  In addition, it removes the overhead that arises from
attempting a drawing operation, having it fail due to an invalid
graphics context, rescheduling and rerunning the operation.  This
accounts for the reduced CPU usage.

- Marc

Click on article to view the messages of the thread
ISO the most current version of tkpath
Posted by Helmut Giese <hgiese@ratiosoft.com> 3 months ago
Last contribution 3 months ago 5
Replies:
  • Helmut Giese <hgiese@ratiosoft.com> replied 3 months ago
  • Michael Soyka <mssr953@gmail.com> replied 3 months ago
  • Harald Oehlmann <wortkarg3@yahoo.com> replied 3 months ago
  • Helmut Giese <hgiese@ratiosoft.com> replied 3 months ago
  • r.zaumseil@freenet.de (rene) replied 3 months ago
Hello out there,
the tkpth version I use is 0.3.3 - and I stumbled over a severe
problem: tkpath crashes on an innocent 
	$c itemconfigure <some existing id>
out of the blue sky.
I am willing to (try to) debug it, but I would like to work on the
current version.
Any link or idea will be greatly appreciated
Helmut

Click on article to view the messages of the thread
How do I pack a megawidget?
Posted by Luc <luc@sep.invalid> 3 months ago
Last contribution 3 months ago 2
Replies:
  • Rich <rich@example.invalid> replied 3 months ago
  • saito <saitology9@gmail.com> replied 3 months ago
I know y'all gonna hate this question because I'm not showing much code,
but I am really more interested in concepts than code.

I made a package. It's supposed to be a megawidget. I haven't snitted it
yet. I can't snit it without understanding where I am supposed to go
with it. So here is the problem.

package require giggles

set of $::w.outerframe
frame $of -height 100
pack $of -fill both -expand 1

set gg $of.giggles
::giggles::giggles $gg -guifont "Arial 14" -geometry pack
pack $gg -fill both -expand 1

And it works. The prototype megawidget is inserted into my test parent
application.

The problem is, commenting out the last 'pack' line makes no difference.
The megawidget still shows. (Also, funny that apparently it's redundant 
but nothing clashes.) And of course that is not standard widget behavior.

Of course, I am packing everything in the megawidget. But if I don't, 
then what? I can't just leave it hanging because if I do, then the 
author of the parent widget will have to inspect the code of the 
megawidget to figure out what he is supposed to pack to get it all 
working which, again, is not standard widget behavior, it's actually
pretty stupid. I have to expose something. Something that will take
the 'pack' command from the parent application and make the entire 
megawidget come together, with all of its components.

How do I do that?

-- 
Luc
>>

Click on article to view the messages of the thread
regarding lrange and stride ...
Posted by Andreas Leitgeb <avl@logic.at> 3 months ago
Last contribution 3 months ago 0
Strided lists are a somewhat common feature in Tcl commands,
starting with  foreach/lmap, lsort, ...

Recently it occurred to me that [lrange $list $first $last]
would be extensible to become more helpful for strided lists.

In essence, an optional 4th argument would be the $stride:

set list {a A 1 b B 2 c C 3 d D 4}
lrange $list 1 2 3
->  {b B 2 c C 3}

If not already obvious, the extra stride argument "pretends" that
there is an extra list level of each 3 elements,
 {{a A 1} {b B 2} {c C 3} {d D 4}} on which the usual lrange
happens, and then the extra level "disappears".

In the simple "numeric" cases it would be essentially like:
   proc lrange_s {l f t s} {
      lrange $l [expr {$f*$s}] [expr {($t+1)*$s-1}]
   }
....plus extra code for nonnumeric indices "end", "end-42", "40+2",...
and some special cases where [llength $list] is not an integral multiple
of the stride.

Click on article to view the messages of the thread