| Ticket UUID: | 082a30e45a101c8c7776af1075a6bd2813e13709 | |||
| Title: | Error in ::tk::ScrollByUnits | |||
| Type: | Bug | Version: | 9.0.2 | |
| Submitter: | SVIDevelopment | Created on: | 2026-05-21 10:18:35 | |
| Subsystem: | 16. [scrollbar] | Assigned To: | nemethi | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2026-05-22 17:43:20 | |
| Resolution: | Fixed | Closed By: | nemethi | |
| Closed on: | 2026-05-22 17:43:20 | |||
| Description: |
We received a bug report about an error in ::tk::ScrollByUnits:
can't read "Priv(xEvents)": no such element in array
while executing
"if {($Priv(xEvents) + $Priv(yEvents) > 10) &&
($axis eq "x" && $Priv(xEvents) < $Priv(yEvents) ||
$axis eq "y" && $Priv(yEvents) < $Priv(xEvents)..."
(procedure "tk::ScrollByUnits" line 14)
We have not been able to reproduce it ourselves, but looking at the logic it seems like the <Enter> events was not (yet) resolved when ::tk::ScrollByUnits was entered. So a valid fix seems to be to make sure both "events" variables are initialized before doing the if statement, by adding
set otherAxis [expr {$axis eq "x" ? "y" : "x"}]
if {![info exists Priv(${otherAxis}Events)]} {
set Priv(${otherAxis}Events) 0
}
The platform is Windows.
| |||
| User Comments: |
nemethi (claiming to be Csaba Nemethi) added on 2026-05-22 17:43:20:
Fixed by commits [cca7d076] (main) and [2eb7e410] (core-9-0-branch). In addition, guarded against potential similar problems related to entry and notebook widgets. nemethi (claiming to be Csaba Nemethi) added on 2026-05-21 15:57:02: Assigned to myself. The fix is coming soon. | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki