|
2026-11-10
| ||
| 09:34 | • Ticket [3da0592d] Filesystem dialogs conflict with auto_reset (under Linux) status still Closed with 3 other changes artifact: a29c58d5 user: serhiy.storchaka | |
|
2026-11-09
| ||
| 20:58 | • Closed ticket [3da0592d]. artifact: 54ecf85c user: nemethi | |
| 20:52 | Fix for [3da0592db4]: Filesystem dialogs conflict with auto_reset (under Linux) check-in: 02e5e9b5 user: csaba tags: core-8-6-branch | |
| 20:44 | Fix for [3da0592db4]: Filesystem dialogs conflict with auto_reset (under Linux) check-in: 835c26cd user: csaba tags: core-9-0-branch | |
| 20:42 | Fix for [3da0592db4]: Filesystem dialogs conflict with auto_reset (under Linux) check-in: 5926b175 user: csaba tags: trunk, main | |
|
2026-10-23
| ||
| 22:12 | • Ticket [3da0592d] Filesystem dialogs conflict with auto_reset (under Linux) status still Open with 4 other changes artifact: 2ffb600d user: serhiy.storchaka | |
| 22:11 | Fix [3da0592db4]: after [auto_reset], the Tk file dialogs failed with "invalid command name .__tk_filedialog.contents.icons" (X11), or with "Duplicate element ComboboxPopdownFrame.border" (Tk dialogs on Windows). auto_reset removes the TclOO classes of the icon list, which destroys the cached dialog's icon list, and the commands of tk.tcl, so tk.tcl and ttk.tcl get sourced again. Recreate the dialog when its icon list is gone, let megawidget.tcl be sourced again, and load the ttk themes only once. Test choosedir-6.1. closed check-in: a2611c44 user: serhiy.storchaka tags: dialogs-after-auto-reset | |
|
2021-01-03
| ||
| 23:25 | • Ticket [3da0592d] Filesystem dialogs conflict with auto_reset (under Linux) status still Open with 4 other changes artifact: ab017f2a user: fvogel | |
|
2020-12-17
| ||
| 19:42 | • New ticket [3da0592d]. artifact: a7b9d8f0 user: kvutza | |
| Ticket UUID: | 3da0592db4b21e4aed4ba8c276348c2a71142379 | |||
| Title: | Filesystem dialogs conflict with auto_reset (under Linux) | |||
| Type: | Bug | Version: | 8.6.18, 9.0.5, 9.1.0 | |
| Submitter: | kvutza | Created on: | 2020-12-17 19:42:33 | |
| Subsystem: | 37. [tk_get*File] | Assigned To: | dkf | |
| Priority: | 5 Medium | Severity: | Important | |
| Status: | Closed | Last Modified: | 2026-11-10 09:34:00 | |
| Resolution: | Fixed | Closed By: | nemethi | |
| Closed on: | 2026-11-09 20:58:31 | |||
| Description: |
It shows itself when using a file/dir dialog and the "auto_reset" command, thus I do not know whether it is in Tcl or Tk.
Issue reproduction, running wish in a Linux terminal:
==============================================================
tk_chooseDirectory
auto_reset
tk_chooseDirectory
==============================================================
Error message in the graphical error dialog:
==============================================================
invalid command name ".__tk_choosedir.contents.icons"
invalid command name ".__tk_choosedir.contents.icons"
while executing
"$data(icons) deleteall"
(procedure "::tk::dialog::file::Update" line 44)
invoked from within
"::tk::dialog::file::Update .__tk_choosedir"
("after" script)
==============================================================
It is similar when using a file-choosing (instead of dir choosing) dialog.
Here getting the error message in the terminal instead of in the graphical error dialog.
==============================================================
% tk_getOpenFile
% auto_reset
% tk_getOpenFile
invalid command name ".__tk_filedialog.contents.icons"
==============================================================
| |||
| User Comments: |
serhiy.storchaka added on 2026-11-10 09:34:00:
Test choosedir-6.1 failed in CI on Linux and macOS: package require tk in a new interpreter could not find Tk, because Tk is not installed there. Where Tk is installed, the child interpreter could load the installed Tk instead of the tested one. Fixed in [4aaad335cc] (main, using childTkInterp), [fdbba3c0a8] (9.0) and [2d73d468a9] (8.6, using loadTkCommand). nemethi (claiming to be Csaba Nemethi) added on 2026-11-09 20:58:31: Serhiy, many thanks! Merged into main, core-9-0-branch, and core-8-6-branch by commits [5926b175], [835c26cd], and [02e5e9b5]. serhiy.storchaka added on 2026-10-23 22:12:56: auto_reset removes every command listed in auto_index. This includes the TclOO classes ::tk::Megawidget and ::tk::IconList, and deleting a class deletes its objects, so the icon list of the cached dialog is gone. Then megawidget.tcl could not be sourced again, because ::tk::MegawidgetClass survives. The commands of tk.tcl are removed too, so tk.tcl and ttk.tcl get sourced again, and on Windows (and in 8.6 and 9.0 on X11) the ttk themes fail with "Duplicate element ...". Fixed on branch dialogs-after-auto-reset ([a2611c4418]): the dialog is recreated when its icon list is gone, megawidget.tcl can be sourced again, and the ttk themes are loaded only once. Test choosedir-6.1. Tested on Linux and Windows. fvogel added on 2021-01-03 23:25:45: dkf, may I assign this to you? Here is why, in the form of a start of an analysis of what's happening. The second time tk_chooseDirectory is called, is does not create the dialog again, rather this part of the code gets executed. At this point, data(icons) gets the right value (which is ".__tk_choosedir.contents.icons"). Then ::tk::dialog::file::UpdateWhenIdle $w gets called, and this schedules a call to ::tk::dialog::file::Update at idle time. The error triggers when calling $data(icons) deleteall in ::tk::dialog::file::Update. The error says "invalid command name". My understanding is that it somehow means that the connection to the deleteall method in the iconlist megawidget got lost by the call to auto_reset. How exactly this happened is not clear to me. We are here in the experimental megawidget package implementing the iconlist megawidget in oo classes in which I got totally lost. This is not my area of expertise at all, which is why I'm kindly requesting you, dkf, if you could have a look at this issue. If my analysis turns to be wrong, please accept my apologies in advance. | |||
