Posted to tcl by emiliano at Fri May 29 15:31:39 GMT 2020view raw

  1. package require Tk
  2. set var1 var1
  3. set var2 var2
  4. upvar 0 var1 alias
  5. pack [entry .alias -textvariable alias]
  6. update idle
  7. upvar 0 var2 alias
  8. puts "entry -textvariable: [.alias cget -textvariable]"
  9. puts "variable value: [set [.alias cget -textvariable]]"
  10. puts "entry content: [.alias get]"
  11.  
  12. # output differs