In XOTcl each class is an object: so a variable of a class can be used as a classifier-scoped attribute of all instances of that class.
Example:
Class Point Point set classVar 1 Point instproc getClassVarFromInstance {} { [self class] set classVar }
Point p1 Point p2
puts [p1 getClassVarFromInstance] -> 1 puts [p2 getClassVarFromInstance] -> 1
Regards,
Uwe
On Thursday 13 November 2003 22:15, Jim Russell wrote:
I may have overlooked it in the documentation, but I'm having trouble getting a classifier-scoped member variable in XOTcl. Is there a way to mimic the behavior of a C++ static data member?
Xotcl mailing list - Xotcl@alice.wu-wien.ac.at http://alice.wu-wien.ac.at/mailman/listinfo/xotcl