[Xotcl] Initialisation arguments

Gustaf Neumann neumann at wu-wien.ac.at
Fri Oct 20 22:11:42 CEST 2006


Kristoffer Lawson schrieb:
> Are these stored anywhere within XOTcl? If not, I presume that 
> information is not currently available to the script end? I'm just 
> wondering as I think I could make good use of that with object 
> recreation based on its serialised form.
Kristoffer,

i am not sure, i understood your question. however, there is no hidden 
information
in xotcl, which is not accessible for a script writer.

The default values for attributes are stored as ordinary attributes in 
the slot objects. the
Attribute slot objects have for this purpose the attribute named 
"default". See:
http://media.wu-wien.ac.at/doc/tutorial.html#attribute-slots

If objects are serialized with the xotcl serializer, they are serialized 
with their current settings.
In other words, the object created after derserialization is identical 
to the object which was
serialize.

Per default, the slot objects are created as child objects of the class. 
That means, if
someone serializes the class as well, the default values are kept as 
well in the serialized
state.

-gustaf



More information about the Xotcl mailing list