tobinharris
4 Jul 2010, 4:56 AM
I have a store declared as:
MyProj.Data.Cards = new Ext.data.Store({
model: 'Card'
proxy: new Ext.data.LocalStorageProxy({
id: 'cards-proxy'
})
});
Then I attach a hook to the Store to get notified when it changes.
MyProj.Data.Cards.on('datachanged',function(){alert('it changed');});
Then I load some data in:
MyProj.Data.Cards.loadData(someData);
For some reason the datachanged is firing twice. I've looked at the Sencha source and I can't see why this is happening at all.
In fact, even if I do this I still get the same problem.
MyProj.Data.Cards.suspendEvents();
MyProj.Data.Cards.loadData(found,false);
MyProj.Data.Cards.resumeEvents();
Any help appreciated.
T
MyProj.Data.Cards = new Ext.data.Store({
model: 'Card'
proxy: new Ext.data.LocalStorageProxy({
id: 'cards-proxy'
})
});
Then I attach a hook to the Store to get notified when it changes.
MyProj.Data.Cards.on('datachanged',function(){alert('it changed');});
Then I load some data in:
MyProj.Data.Cards.loadData(someData);
For some reason the datachanged is firing twice. I've looked at the Sencha source and I can't see why this is happening at all.
In fact, even if I do this I still get the same problem.
MyProj.Data.Cards.suspendEvents();
MyProj.Data.Cards.loadData(found,false);
MyProj.Data.Cards.resumeEvents();
Any help appreciated.
T