Also look at one of the oldest of them: Tk toolkit (usually associated with tcl, but also available in other languages). When updating Tk, the value in the GUI is usually done by simply updating the variable:
set foo "Hello" ;
pack [label .l -textvariable foo]
set foo "Goodbye"
Or a more attractive example: a 10 second countdown widget:
set countdown 10
pack [label .count -textvariable countdown]
proc tick {} {
incr countdown -1
if {$countdown > 0} {
after 1000 tick
}
}
tick
Actually, this function is displayed in tcl through the trace command:
set foo 0
proc autoIncrement {varname args} {
incr $varname
}
trace add variable foo read {autoIncrement foo}
, , . , , , setInterval(). , Tk .