PDA

View Full Version : [FIXED-30] LocalStorage store seems to be loading twice (0.82)



rdougan
4 Jun 2010, 4:24 AM
this.userStore = new Ext.data.Store({
model: 'User',
proxy: new Ext.data.LocalStorageProxy({
id: 'user'
}),
autoLoad: true
});

this.userStore.on('datachanged', function() {
console.log('loaded');
}, this);

I console.log'd everywhere in ext-debug-all where datachanged was being fired, order was:

sort()
loadRecord()
loaded
sort()
loadRecord()
loaded

A loaded event would be useful if at all possible.

edspencer
19 Jun 2010, 5:06 AM
Is this still happening? I think you had previously had a problem with bindStore, which may have been causing this.

TommyMaintz
29 Jun 2010, 3:16 PM
Although the reason was you were calling bindStore twice, there was a bug in bindStore that has been fixed that directly applies to this.