View · Search · Index
No registered users in community xowiki
in last 10 minutes

[Xotcl] children order

From: Krzysztof Frukacz <frukacz.krzysztof_at_gmail.com>
Date: Wed, 12 Jan 2011 14:00:42 +0100

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