Hi,
Is the mixin constructor *always* executed after the constructor of the
including class?
The manual wasn't clear about this. And I need to know this because my
code relies on this behavior. I got a mixin with a (not nullable)
qx.data.Array property. This property can be initialized by the mixin in
its constructor. However, from what I've seen so far, the mixin
constructor is called after the constructor of the including class.
This means, for classes implementing the mixin, which initializes
objects in the constructor that rely on that property, that those
objects receive exceptions for accessing a not initialized property. To
solve it I initialize the property in the class including the mixin,
before objects relying on that property are created.
For other classes I run this code in the constructor of the mixin:
-----------------------------
try {
this.getFilters();
} catch (err) {
// lets assume the property wasn't initialized yet
this.initFilters(new qx.data.Array());
}
-----------------------------
Kind regards,
Martijn
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel