No registered users in community xowiki
in last 10 minutes
in last 10 minutes
[Xotcl] XOTcl-copy and trace
From: Murr, Florian <florian.murr_at_siemens.com>
Date: Wed, 2 Jan 2008 15:06:11 +0100
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
Date: Wed, 2 Jan 2008 15:06:11 +0100
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