| Deutsch English Français Italiano |
|
<1028qt2$12ol4$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Harald Oehlmann <wortkarg3@yahoo.com>
Newsgroups: comp.lang.tcl
Subject: =?UTF-8?Q?Re=3A_A_few_notes_on_porting_Tcl/Tk_8=2E6_=E2=86=92_9?=
Date: Tue, 10 Jun 2025 10:37:56 +0200
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <1028qt2$12ol4$2@dont-email.me>
References: <1028pa5$14hqg$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 10 Jun 2025 10:37:54 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="28a168c0a320d27d7003c0b95cc68158";
logging-data="1139364"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192XivyfFDlg60CgjvR0w3D"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:zJa19/KGUljDozLm6w/PFfB4vcI=
In-Reply-To: <1028pa5$14hqg$1@dont-email.me>
Content-Language: en-GB
Am 10.06.2025 um 10:10 schrieb Mark Summerfield:
> 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.
Mark,
thanks for you effort.
The porting wiki pages are:
https://core.tcl-lang.org/tcl/wiki?name=Migrating+scripts+to+Tcl+9&p
https://core.tcl-lang.org/tk/wiki?name=Migrating+scripts+to+Tk+9&p
The -outline is not mentioned there. I suppose, this is a bug.
May you file a report?
If it is not a bug, it would be great to add it to the wiki page.
Thanks for all,
Harald