Posted to tcl by evilotto at Tue Apr 01 21:59:42 GMT 2014view raw
- label .el -text "Sync"
- entry .e -width 10 -textvariable t
- label .e2l -text "Async"
- entry .e2 -width 10 -textvariable t
- text .t -width 20 -height 4
- grid .el .e
- grid .e2l .e2
- grid .t -
- proc callback_sync {w} {
- .t insert end "start callback"
- update idletasks
- after 1000
- .t insert end "done"
- }
- proc callback_async {w} {
- .t insert end "start callback"
- after 1000 {.t insert end "done"}
- }
- bind .e <Key> {callback_sync %w}
- bind .e2 <Key> {callback_async %w}