Cold Help System: Programming: ColdC Reference Manual: Functions: Object: data()


DICTIONARY data([OBJNUM ancestor])

This administrative function is used to retrieve all instances of object variables the current object has, as well as the values of any object variable they define. If ancestor is not defined it will return all instances defined by any ancestor. If ancestor is defined it will only return data which is defined by the specific ancestor.

The data is returned in a dictionary, where each object variable is a key and the association to the key is the value for the object variable. If no ancestor is specified and all instances are returned, each ancestor's values are contained within another dictionary, where the key is the ancestor.

If an ancestor defines an object variable, but no instance of that variable has been created for the current object (or the instance has been cleared with the function clear_var()), it is not included in the dictionary.

The keys in a dictionary returned by data() do not have any particular ordering.


ancestors() | children() | chparents() | create() | data() | del_objname() | destroy() | has_ancestor() | lookup() | objname() | objnum() | parents() | set_objname()


the Cold Dark