PDA

View Full Version : When can I be sure a store is added and ready for a combo?



Igor.Szyporyn
24 Oct 2013, 12:18 PM
Hello.

Using the event 'added' - I find situations where store is null.

Can this be true, or do I have some other problem I need to look into? Or can it be so, and how do I then make sure I use a listener when I know the store is ready?

Thanks

Salakar
25 Oct 2013, 3:16 AM
var loaded = true;
if (store.isLoading()) {
loaded = false;
}
if(loaded) {
// do stuff now as the store is loaded
}

Igor.Szyporyn
25 Oct 2013, 9:00 AM
Problem was indeed mine, the component was destroyed meanwhile and another with the same name was created a few ms later :-(