[Xotcl] Problem with automatic variable unsetting upon return
from an instproc?
Jim Russell
Jim.Russell at dynetics.com
Wed Nov 19 19:29:28 CET 2003
XOTcl is so cool! I like it so much better than incrTcl. This is
exactly what I was looking for. Thank you so much for the help.
Jim
Uwe Zdun wrote:
> Hi!
>
> the -volatile option of new does something like this for local objects in the
> current scope (it uses an "unset" trace set in C). Example:
>
> package require XOTcl
> namespace import ::xotcl::*
>
> Class A
> A instproc destroy args {
> puts "I'm destroyed: [self]"
> next
> }
> A proc x {} {
> A new -volatile
> }
> A x
>
> Does this help?
>
> Uwe
More information about the Xotcl
mailing list