Mar 31, 2015, 7:55 PM
[CLOSED] Re-write Ext.preg call as Ext.define - Extjs5 migration
We use many plugins and have traditionally used this method to register them:
"Ext.preg is not a function"
According to the Extjs migration page,http://www.manilaforwarders.com/asse...migration.html, I should be using Ext.define(...), but I have not found any clear examples that would apply, to the type of code above, using define().
Can you give me some guidance?
if (typeof Ext !== 'undefined') {
var AutomatedTesting = Ext.extend(Object, {
constructor: function (config) {
config = config || {};
Ext.apply(this, config);
},
init: function (parent) {
var parentFn = parent.view.getRowClass || Ext.emptyFn;
parent.view.getRowClass = function (record, rowIndex, rp, ds) {
var cls = ' qa-row-' + record.id;
var parentCls = parentFn(record, rowIndex, rp, ds);
if (parentCls != undefined) {
cls += ' ' + parentCls;
}
return cls;
};
}
});
Ext.preg('AutomatedTesting', AutomatedTesting);
};
On my Ext3 pages I am now getting the js error:"Ext.preg is not a function"
According to the Extjs migration page,http://www.manilaforwarders.com/asse...migration.html, I should be using Ext.define(...), but I have not found any clear examples that would apply, to the type of code above, using define().
Can you give me some guidance?
Last edited by Daniil; Apr 10, 2015 at 2:04 PM.
Reason: [CLOSED]