Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (0 / 6) |
Uptime: | 53:15:34 |
Calls: | 422 |
Files: | 1,025 |
Messages: | 90,610 |
Hello out there,
say I have a class and 2 instances like so
oo::class create MyClass {
constructor {someVal} {
my variable myVar
set myVar $someVal
}
method get {} {
my variable myVar
return $myVar
}
method set {val} {
my variable myVar
set myVar $val
}
}
MyClass create obj1 33
MyClass create obj2 99
How can I set a trace on 'myVar' of 'obj2'?
I found an example on the doc of the 'my' command but it sets a trace
on a global variable during which an object is invoked - which doesn't
fit my situation
Any help will be greatly appreciated
Helmut