[Xotcl] children order

Krzysztof Frukacz frukacz.krzysztof at gmail.com
Wed Jan 12 14:00:42 CET 2011


Hello,

I would like to use the children mechanism for my classes. When I create 
a class (lets call it B) I use -contains {...} and list other objects. 
But in init proc of B I also use this: eval C new -childof [self].
I am interested in the order that children are listed. I need it to be 
fixed. I noticed that first goes the child from init of class B, then 
the ones that I add using -contains (outside the init proc).

Is this order fixed? (first children created in superclesses, then ones 
from cunstructor, then ones from -contains). Also: is the order used in 
-contains fixed? Will I always get children in the same order that I 
added them?

Best Regards,
-- 
Krzysztof Frukacz


More information about the Xotcl mailing list