Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

UI.createImageView question

Ok I have come across an error and im puzzled as I can not see where im going wrong. Please help


— asked June 30th 2010 by Chris Johnson
  • createimageview
  • image
  • iphone
  • url

3 Answers

  • What is CustomData[i].flag because i have used image views with paths to local files and remote urls. i.e. '/images/flag.png'

    — answered June 30th 2010 by Kevin Smithson
    1 Comment
    • CustomData[i].flag is my content being parsed from an XML file. It looks like this flag:'eng.png'

      — commented June 30th 2010 by Chris Johnson
  • If the first code snippet works on the simulator and dies in the device, your file URL is probably missing some capital letters - on the Mac, file names are not case sensitive, but on the real device they are.

    In the second case, the image parameter is expecting to be passed an actual image in the form of a file or a blob - the file path should be passed in the url parameter.

    — answered June 30th 2010 by Kevin Whinnery

    Ok, I having played about with the code which i know should work (using the property IMAGE:OBJ) i turned my attention to the SDKs.

    I was previously using Titanium Mobile SDK 1.3.2 & iPhone SDK 4.0. After changing the iPhone SDK version to 3.1 all images work on the device as they do on the simulator.

    There must be some sort of bug in the iOS4.0 SDK version that doesn't like the property. Thanks all for your help and comments.

    — answered June 30th 2010 by Chris Johnson
    1 Comment
    • my images are not working on buttons, could this be the problem as well? What should I do so that I can test on iOS4.0?

      — commented July 1st 2010 by Abraham Vivas
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.