|
From: Joey M. <jo...@sw...> - 2005-08-16 20:25:04
|
I found what I think is a difference in the tile entry and I believe I
have a small test case here:
package require tile
# namespace import -force ttk::entry
global tv1 tv2
set tv1 ""
set tv2 ""
proc updatetv1 {} {
global tv1
set tv1 "This is Text 1"
}
proc updatetv2 {} {
global tv2
set tv2 "This is Text 2"
return 1
}
entry .txt1 -width 40 -relief sunken -bd 2 -textvariable tv1 -bg white
-validate key -validatecommand {updatetv2}
entry .txt2 -width 40 -relief sunken -bd 2 -textvariable tv2 -bg white
button .b1 -text "Update BOTH text fields" -command {updatetv1}
pack .txt1 .txt2 .b1 -side top
If you run the program as is, it works fine. What should happen is
when you click the button, the tv1 (text variable 1) is updated via the
called routine, and the validate command should update the tv2 (text
variable 2). If you uncomment the namespace import, the program no
longer works.
Is this a bug? It might be a design change and I should change my
stuff. I realize from reading the doc that having a textvariable and a
validatecommand might be problematic.
Joey
|