From: Rusty B. <me...@ru...> - 2011-11-02 01:44:02
|
package require Thread set i1 [thread::create] set i2 [thread::create] pack [button .b -text {main thread} -command {tk_messageBox -message "This is from main thread"}] set command { package require Tk pack [button .b -text $::text -command {tk_messageBox -message "This is from $::text"}] } thread::send $i1 "set ::text {thread1}" thread::send $i1 $command thread::send $i2 "set ::text {thread2}" thread::send $i2 $command |