[Xotcl] XOTcl-copy and trace
Murr, Florian
florian.murr at siemens.com
Wed Jan 2 15:06:11 CET 2008
Dear XOTcl-guys!
The script below illustrates what I consider to be an XOTcl bug.
tested with:
Tcl8.4.16 + XOTcl1.5.6
Tcl8.5.0 + XOTcl1.5.6
regards
Florian
#
************************************************************************
******
puts "Tcl[set ::tcl_patchLevel]"
puts "XOTcl [package require XOTcl]" ;# XOTcl 1.5.6, 1.5.5
namespace import xotcl::*
#
########################################################################
######
Class X -slots {
Attribute create q
}
#
************************************************************************
******
X instproc init {args} {
next
my trace add variable q {write unset} [list [self] trc]
}
#
************************************************************************
******
X instproc trc {args} { puts "[self] [info level 0]" }
#
************************************************************************
******
X instproc test1 {} {
puts "[info level 0]"
puts " trace info = [my trace info variable q]"
my copy ::b
puts " trace info = [my trace info variable q]"
puts "'copy' kills the trace!"
}
#
************************************************************************
******
#
########################################################################
######
X create ::a -q hallo
::a test1
More information about the Xotcl
mailing list