View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] Problem with automatic variable unsetting upon return from an instproc?

From: Jim Russell <Jim.Russell_at_dynetics.com>
Date: Wed, 19 Nov 2003 12:29:28 -0600

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