vwait inside TclOO method
Closed / Invalid7bcf45d4cde3e639c64e43306878eb50f3266853Created 10 years agoUpdated 10 years ago
Descriptionhtml2016-10-12 02:06:27
This example never prints "after forever":
oo::class create A {
variable forever
method stop {} {
puts stopping..........
set forever 1
}
method start {} {
vwait forever
puts "after forever..."
}
}
set a [A new]
after 1000 $a stop
$a start
dkfwiki2016-10-12 09:54:02
The vwait command has always been documented to work with variables resolved from the global namespace. TclOO does not change that. Using this instead should work:
vwait [my varname forever]
dkf Ticket [7bcf45d4cd]: 4 changes
[History diff]2016-10-12 09:54:26
Log in (anonymous is fine) to add a comment.