Hi,


I'm trying to show a loading indicator while an <img> is loading. For some reason, I can't hide the indicator after the image is done loading.


Code:
var loader = Ext.get('establishment-image');
var el = img.createChild({
    tag: 'img',
    width: '50',
    height: '50'
});


el.dom.src = 'http://media.smashingmagazine.com/images/illustrator2/star.jpg';


//el.hide(); // this works fine, but is of course not useful
el.on('load', function(){
    var zzz = Ext.get('establishment-image');
        // none of the following work
    zzz.hide();
    loader.hide();
    zzz.setVisible(false);
    console.log(''should be removed!"); // called
})

For some reason hiding the element doesn't work inside the listener callback.


Thanks!