I found an error in Tree widget when navigate inside it
with keyboard.
Script to reproduce a bug:
------------------
#! /usr/bin/wish
package require Tk
package require BWidget
Tree .t
pack .t
------------------
When I focus .t widget and press Down key I saw popup
window with error message:
.t selection set: Cannot select unknown node "".
.t selection set: Cannot select unknown node "".
while executing
"Tree::selection .t set {}"
("eval" body line 1)
invoked from within
"eval [linsert $args 0 Tree::$cmd .t]"
(procedure ".t" line 1)
invoked from within
"$win selection set [lindex $nodes 0]"
("down" arm line 4)
invoked from within
"switch -exact -- $which {
"up" {
# Up goes to the node that is vertically above the
current node
# (NOT necessarily the current node's pare..."
(procedure "Tree::_keynav" line 24)
invoked from within
"Tree::_keynav down .t"
(command bound to event)
I use Debian Sarge with following versions of software:
* Tcl 8.4.9
* Tk 8.4.9
* BWidget 1.7.0
As I understand last version of BWidget from cvs
repository affected by this bug too.
Patch: the simplest decision is to add folowing code to
the beginning of Tree::_keynav procedure
------------------
if {[$win nodes root] eq ""} {
return
}
------------------
|