Hello,
Im just trying to create a couple mixins for a grid panel, to seperate out my code into easier to read sections.
Code:
Ext.define('My.Custom.Grid',{
extends:'Ext.grid.Panel',
alias:'widget.customGrid',
mixins:{
columnRenderer:'My.Custom.ColumnRenderer'
},
initComponent:{
var me=this,
columns=[];
var newCol={
dataIndex:'firstColumn'
}
newCol.renderer=this.columnRenderer.colRenderer.apply(undefined,arguments);
Ext.apply(me,{
columns:columns
});
me.callParent(arguments);
}
});
Code:
Ext.define('My.Custom.ColumnRenderer',{
colRenderer:function(value, metaData, record, rowIndex, colIndex, store, view) {
return value*100;
}
);
My code is getting the error in ExtClass.registerPreprocessor, Cannot read property Instance of undefined.
What am I doing wrong? The main goal is to seperate out a bunch of functionality, primarily because its too much in one file.
Thanks.