Ext.base.borrow not working as with ExtJs 4.0.7?
We have an override for Ext.data.AbstractStore that adds plugin-support for Stores. To minimize needed changes between ExtJS updates I coded it with using borrow which borrows the plugin initialization logic from Ext.AbstractComponent like this:
In ExtJs 4.0.7 this was working fine, but with ExtJS 4.1Beta1 this bails out in constructPlugin() where plugin is null. I tried to debug it, but debugging borrowed methods is kinda fun. Perhaps its a scope problem. I noticed that Ext.Base.borrow changed a lot between 4.0.7 and 4.1Beta1. So either this introduced a bug or I'm doing something wrong.
* Add plugin support for stores.
* This is done by borrowing some methods from Ext.AbstractComponent and modifying the constructor of Ext.data.AbstractStore
//borrow plugin methods from AbstractComponent
//add plugin initialisation code at the end of the constructor of Ext.data.AbstractStore:
this.plugins = .concat(this.plugins);
for (i = 0, len = this.plugins.length; i < len; i++)
this.plugins[i] = this.initPlugin(this.plugins[i]);
If needed I would be willing to provide a complete testcase.