使用wish運行(eclipse編譯環境)
原始碼如下:
package require Thread
set thread2 [thread::create {
puts "thread2行程開始"
proc start {} {
button .test -text "開始測驗" -command {Test}
place .test -x 350 -y 510
}
thread::wait
}]
thread::send -async $thread2 [list start]
運行時報如下錯誤:
thread2行程開始
Error from thread tid0000183C
invalid command name "button"
while executing
"button .test -text "開始測驗" -command {Test} "
(procedure "start" line 2)
invoked from within
"start"
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/85427.html
上一篇:TCL多執行緒問題求助
