PDA

View Full Version : [SOLVED] ActionColumn and "Cls is not a constructor"



ctp
23 Nov 2010, 12:51 AM
Hi all,

I'm playing around with actioncolumn for hours now and have minimized my code to this one:


App.widget.PropertyListGridPanel = Ext.extend(Ext.grid.GridPanel, {
constructor: function(config) {

var config = Ext.apply(config || {},
{
id: 'propertyListGridPanel',
height: 600,
border: false,
store: new App.store.PropertyStore,
columns: [{
header: 'PDF',
sortable: false,
xtype: 'actioncolumn',
width: 40,
align: 'center',
iconCls: 'icon-pdf',
handler: function(grid, rowIndex, colIdex, item, e) {
alert("Foo");
}
}]
});
App.widget.PropertyListGridPanel.superclass.constructor.call(this, config);
}
});
Ext.reg('property_list_grid_panel', App.widget.PropertyListGridPanel);
My trouble occurs instantiating this widget. I always get a "Cls is not a contructor" coming from ext-all-debug.js line 45659. Any hints what's going wrong?

Condor
23 Nov 2010, 1:35 AM
Are you actually using Ext 3.3? Ext 3.2 didn't have an xtype: 'actioncolumn'.

ctp
23 Nov 2010, 1:51 AM
Argh, you're right again ;-) Used most recent API but Ext 3.2.2. Works fine now ;-)