There are mixin class that merges methods to target class. I want to know when merging process starts?
I've overridden one of the methods of mixin, but it hasn't been overrode in target class. So I assume that merging goes before overriding.
Ext.define('Ext.container.DockingContainer',
...
Ext.define('Ext.panel.Panel',
...
Ext.override(Ext.container.DockingContainer
At first ext.js defines mixin, then target class. When I override mixins method, it doesn't impact target classes method. So how to solve this problem? How to override mixins method properly?
I've overridden it with this way:
Ext.define('Ext.overrides.container.DockingContainer',
{
override: 'Ext.container.DockingContainer',
getDockedItems: function(selector, beforeBody)
{
....
}
}, function() {
Ext.Object.each(Ext.ClassManager.classes, function(name, cls) {
if (cls.prototype && cls.prototype.mixins && cls.prototype.mixins.hasOwnProperty("docking")) {
cls.prototype.getDockedItems = this.prototype.getDockedItems;
}
}, this);
}
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With