Tk Library Source Code

View Ticket
Login
Ticket UUID: 0affb86c8f70715777540b4c8b05b1e2cbcc436
Title: getstring: destroying the dialog raises an error
Type: Bug Version: trunk
Submitter: serhiy.storchaka Created on: 2026-11-21 18:08:47
Subsystem: None Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2026-11-21 18:08:47
Resolution: None Closed By: nobody
    Closed on:
Description:

The bug below was found by the tests in branch tests-getstring; it is covered by test getstring-4.6 with the knownBug constraint.

  • ::getstring::tk_getString binds <Destroy> to set the result to 0, but when the dialog window is destroyed (for example by the window manager close button or destroy .gs) it then executes $w.entry get on the destroyed entry and fails with invalid command name ".gs.entry" instead of returning 0. Tk 8.6 and 9.1. Test getstring-4.6.

Related: [2829049fff] (a different issue in the same code).