Not sure exactly, but it makes various time I got a Error: variable is not properly set.
in creation procedures' calling order. I figured out that creating class attributes before calling default_create
seemed to solve the problem. Why is that so? It doesn't seem that default_create calls something in my make routine??!!!
Try to make an example even if I don't think I can reproduce it with a simple example...
class A
feature
attr: B
make
do
create attr
default_create
end
end
class A
feature
attr: B
make
do
default_create
create attr
end
end
default_create
makes some calls. There may be a call on Current
(direct or indirect, e.g. if Current
is passed somewhere as an argument). If the attribute attr
is not set at this point, the current object is not completely initialized and using it in regular feature calls may lead to calls on Void target (due to polymorphism, in particular). In order to avoid this issue, it is required to set all attributes before any calls involving Current
.