createImageView() on iPhone simulator throws serious error - it's killing me!
Using Titanium Developer 1.2.1, Titanium SDK 1.4.2, iOS SDK 4.2
Trying to get an Image View to pull in an image - should be simple, right?
root.js file is Resources/windows/ and
snowperson.png file is in Resources/images/
Using a relative path in this bit of code within root.js:
var windowCurrent = Ti.UI.currentWindow;
...
var viewSnowPerson = Ti.UI.createImageView(
{
image:'../images/snowperson.png',
top:0,
width:50,
height:50
});
...
windowCurrent.add(viewSnowPerson);
Throws up this error:
[ERROR] Failed to load image: ../images/snowperson.png – file://localhost/windows/root.js, Error: Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred" UserInfo=0x6827040 {NSUnderlyingError=0x683b8c0 "The operation couldn’t be completed. Connection refused", NSLocalizedDescription=A connection failure occurred}
2 Answers
-
Accepted Answer
take a look at this thread I think it will give you some options
http://developer.appcelerator.com/question/83211/images-on-iphone
-
Great, I'll take a look - sounds like it's what I'm after.
Thanks Aaron.