Reputation: 676
Let's say I want to define a new mixin that extends qx.ui.basic.Atom capabilities. This mixin will have functionality that applies only to qx.ui.basicAtom and it's subclasses an'd doesn't make sense for other classes. Is there any way to restrict the mixing to be allowed only to qx.ui.basic.Atom subclasses?
Upvotes: 0
Views: 51
Reputation: 676
Never mind, I found it. In the mixin constructor we can do
construct: function (){
if (qx.core.Environment.get("qx.debug")) {
this.assertInstance(this, qx.ui.basic.Atom, "Error: This mixin can be included only in instances of qx.ui.basic.Atom")
}
},
Upvotes: 2