Feature Request:
Expose "error" event in imageViews
Description
If a remote image fails to render, the console outputs the following:
[ERROR] Failed to load image:'http://someimage.png', error: ....
We need a way to catch that error in the Javascript so that we can act accordingly, for example, show an "error_image.png".
Example:
var img = Ti.UI.createImageView({
image:'http://someurl.com/someimage.png'
});
win.add(img);
img.addEventListener('error', function(){
img.image = 'error_image.png';
});
Verified fix with: Titanium Studio, build: 2.1.1.201207271312 Titanium SDK: 2.2.0.v20120816212512 Devices: iPhone 4s 5.0.1 iPad1 ios5 5.1.1 Simulator 5.1 Mac osx 10.8 Mountain Lion