[Xotcl] Dynamic class change question
Murr, Florian
florian.murr at siemens.com
Wed Mar 1 09:02:20 CET 2006
In XOTcl (1.3.8) there seems to be no initialisation of parameters
during dynamic class change.
See code below: a1 and a2 behave differently.
Is this the intended behaviour?
- regards, Florian
package require XOTcl
namespace import xotcl::*
eval [string map {INFO {[self] [info level 0] : [my info class] : [my
info vars]}} {
Class A -parameter {
{p 0}
}
A instproc pp {} { puts "A INFO"; next }
Class B -superclass A -parameter {
{q 0}
}
B instproc pp {} { puts "B INFO"; next }
}]
proc main {} {
set strich
"--------------------------------------------------------------"
puts $strich
A create a1 -p a1
a1 class B
#a1 init
a1 pp
#puts "a1 q = [a1 q]" ;# should this be an error?
puts $strich
A create a2 -p a2
a2 class B
a2 q xx
a2 pp
#puts "a2 q = [a2 q]"
puts $strich
}
main
More information about the Xotcl
mailing list