Wednesday, 4 September 2013

after cancel not working in tcl

after cancel not working in tcl

I have written the following code to test after cancel . This code is
supposed to print "Now updating" only once but it is printing it 10 times
so can anyone tell me why after cancel not working
proc update_now {} {
puts "Now updating"
}
proc print_now {} {
after cancel [update_now]
after idle [update_now]
}
for {set count 0} {$count < 5} {incr count} {
print_now
}

No comments:

Post a Comment