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

Re: [Xotcl] [volatile] documented in wrong section?

From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Thu, 20 Jul 2006 19:59:04 +0200

Kristoffer Lawson schrieb:
> In the online reference manual, the volatile method is documented
> under Class, meaning it would be a class procedure.
Kristoffer, you right this is a documentation bug

> In a similar vein, can [volatile] be called at any point, not just
> during object instantiation? I might be getting an object returned
> from somewhere else and, in that proc, I may want to make it volatile
> so as to not have to worry about the point of destruction.
right. volatile is an ordinary method, causing the object to be
destroyed, when the current
variable context is left. The following script ...

---------------------------------------------------------
Class C -instproc destroy {} {puts "destroying [self]"; next}
C c1

proc f {} {
  c1 volatile
}

puts ====
f
puts ====
---------------------------------------------------------

... outputs:

====
destroying ::c1
====

-gustaf

>
> / http://www.fishpool.com/~setok/
>
> _______________________________________________
> Xotcl mailing list
> Xotcl_at_alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl