PDA

View Full Version : Extending classes in 4.1-PR1: what am I missing?



tangix
1 Dec 2011, 5:16 AM
Running the following code in 4.1-PR1:

Ext.define('VTProctor.view.sites.CompanyGrid', {
extend: 'Ext.grid.Panel',
alias: 'widget.companygrid',

columns: [
{
header: 'Name',
dataIndex: 'company_name'
},{
header: 'Class',
dataIndex: 'className'
},{
header: 'Customer No',
dataIndex: 'company_customerNo'
},{
header: 'Territory',
dataIndex: 'territoryName'
},{
header: 'Country',
dataIndex: 'printable_name'
},{
header: 'Employees',
dataIndex: 'employees'
},{
header: 'Website',
dataIndex: 'company_website'
}
],

initComponent: function() {
console.log('sites.CompanyGrid init');
this.store = Ext.getStore('sites.Companies');

this.bbar = Ext.create('Ext.PagingToolbar', {
store: Ext.getStore('sites.Companies'),
displayInfo: true,
displayMsg: 'Displaying Companies {0} - {1} of {2}',
emptyMsg: "No Companies to display"
});

this.callParent(arguments);
}

})

In 4.1-PR1, the grid no longer shows the LoadMask and I have to manually add "loadMask: true" to the config.
In 4.0.7 the default ("true") is applied and in 4.1-PR1 the default is true (tested with the example) but it is not applied!

There must be something I am missing here... What?

mitchellsimoens
1 Dec 2011, 9:34 AM
In our latest code which will be the nest release, I see the load mask by default.

tangix
1 Dec 2011, 9:42 AM
As I put in my post - I have verified that loadMask = true by default, in both 4.0.7 and 4.1-PR1.

My real question was - why doesn't my extend work and set the loadMask property?

mitchellsimoens
1 Dec 2011, 9:44 AM
Nothing sticks out to me although I never put Arrays and Objects as a property. They can sometimes be shared across instances but that shouldn't bother the load mask.

tangix
1 Dec 2011, 9:51 AM
OK - this seems not to be a problem with the extended grid - it seems to be a problem with the run-away load masks discussed here:
http://www.sencha.com/forum/showthread.php?150040-Unexplained-load-mask-in-upper-left-corner-of-browser-again

My extended class works until I change tabs and then the mask is gone which caused me to think that the extend was wrong.

Thanks,
/Mattias