A few notes on porting Tcl/Tk 8.6 → 9

Liste des GroupesRevenir à cl tcl 
Sujet : A few notes on porting Tcl/Tk 8.6 → 9
De : m.n.summerfield (at) *nospam* gmail.com (Mark Summerfield)
Groupes : comp.lang.tcl
Date : 10. Jun 2025, 09:10:45
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <1028pa5$14hqg$1@dont-email.me>
User-Agent : Pan/0.154 (Izium; 517acf4)
I have been porting a small GUI game ~1400LOC from Tcl/Tk 8.6 → 9.

**Changes for 8.6 → 9**

I used ~ for $HOME a few times in one function, so had to change that.

When drawing canvas polygons I found I was getting a 1 pixel black outline
that is _not_ present in the 8.6 version. So it appears that the default for
outline has changed. I easily fixed this by adding `-outline ""` but didn't
spot this in the Tk 9 release notes.

The biggest amount of work was with the namespace change. So I had to change
a lot of `board::...` to `::board::...` and similar. This was tedious but
not difficult.

**Changes since I was changing things**

I switched from sourcing Tcl files to using `.tm` modules; much nicer.

I switched from PNG images to SVG; again, much nicer.

**Scaling**

For scaling I use this line:

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

and have an environment variable `TK_SCALING` which I set to different
values on my desktop and laptop.

However this doesn't work when I put a Tcl/Tk app in a taskbar launcher so
I'm going to add scaling as a config option too.

See Tcl/Tk 8.6: https://github.com/mark-summerfield/gravitate-tcl
and Tcl/Tk 9: https://github.com/mark-summerfield/gravitate-tcl9

PS My ISP has now stopped supporting newsgroup access.
And a few years ago Google stopped supporting them.
I really wish there was a general Tcl/Tk mailing list that could
be used.

Date Sujet#  Auteur
10 Jun 25 * A few notes on porting Tcl/Tk 8.6 → 913Mark Summerfield
10 Jun 25 +* Re: A few notes on porting Tcl/Tk 8.6 → 94Harald Oehlmann
10 Jun 25 i`* Re: A few notes on porting Tcl/Tk 8.6 → 93Mark Summerfield
10 Jun 25 i +- Re: A few notes on porting Tcl/Tk 8.6 → 91Harald Oehlmann
10 Jun 25 i `- Re: A few notes on porting Tcl/Tk 8.6 → 91Harald Oehlmann
10 Jun 25 `* Re: A few notes on porting Tcl/Tk 8.6 → 98Rich
10 Jun 25  `* Re: A few notes on porting Tcl/Tk 8.6 ? 97Helmut Giese
12 Jun 25   `* Re: A few notes on porting Tcl/Tk 8.6 ? 96Mark Summerfield
12 Jun 25    +* Re: A few notes on porting Tcl/Tk 8.6 ? 92Alan Grunwald
16 Jun 25    i`- Re: A few notes on porting Tcl/Tk 8.6 ? 91Colin Macleod
12 Jun 25    +- Re: A few notes on porting Tcl/Tk 8.6 ? 91Ashok
12 Jun 25    `* Re: A few notes on porting Tcl/Tk 8.6 ? 92Rich
15 Jun 25     `- Re: A few notes on porting Tcl/Tk 8.6 ? 91Harald Oehlmann

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal