Feature Request:
Expose "error" event in imageViews
Description
If a remote image fails to render, the console (DDMS) outputs the following:
ERROR/TiUIImageView(8390): (main) [20,7354] Max retries reached, giving up decoding image source: http://someimage
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 with: Appcelerator-Studio:3.3.0.201406271159 Sdk:3.3.0.v20140627202512 acs:1.0.14 alloy:1.4.0-rc3 npm:1.3.2 titanium:3.3.0-rc4 titanium-code-processor:1.1.1 xcode:5.1.1 OS:Maverick(10.9.3) Device : LG-P970(V4.0.4),iPhone5S(v7.1.1) error event is being fired. Working as expected. Hence closing the issue.