When I load my TreeStore a second time before the first load is finished, it fails. TreeStore load() doesn't seem to be reentrant.
So that is what I am doing to make the second load() wait:
loadStore: function(){
var store=this.store;
if (store.isLoading()) this.addListener({
load: function(store,rec,success){
this.loadStore()
},
single: true
});
else store.load();
},
The problem is that there is a window for a race condition between the time I check for isLoading() and the time I call load().
What is the proper way to load a TreeStore in ExtJS, knowing that it can be reloaded later ?