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@alice.wu-wien.ac.at http://alice.wu-wien.ac.at/mailman/listinfo/xotcl