Tk Library Source Code

View Ticket
Bounty program for improvements to Tcl and certain Tcl packages.
Ticket UUID: 6da48f457975aaef5c2b15b50dd87789e886f13a
Title: autoscroll assumes packed widget managed by parent
Type: Bug Version: trunk
Submitter: anonymous Created on: 2016-04-05 12:59:44
Subsystem: tklib :: autoscroll Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2016-04-05 12:59:44
Resolution: None Closed By: nobody
    Closed on:
Line 122 of autoscroll.tcl [1] should be changed:

-                     foreach x [pack slaves [winfo parent $w]] {
+                     foreach x [pack slaves [lindex [pack info $w] 1]] {

For backward-compatibility this uses [lindex _ 1] instead of [dict get _ -in].
pack(n) says this is safe [2].