The "@" symbol only works in BXML. It generates a URL that is relative to the 
current file. In code, you can use Image.load(). For example:

iiaImage.setImage(Image.load(getClass().getResource("image2.png")));


On May 19, 2011, at 2:50 PM, noobmike wrote:

> Hello again fellas
> 
> I know that in .bxml files you can set image views like this:
> <ImageView bxml:id="iiaImage" image="@image.png" styles="{fill:true}"/>
> 
> or you can set text areas like this: 
> <TextArea bxml:id="dndTextArea" text="@textfile.txt"/>
> 
> My trouble is when I bind the variable to my class it doesnt work the same
> way. 
> for instance:
> 
> iiaImage = (ImageView)bxmlSerializer.getNamespace().get("iiaImage");
> iiaImage.setImage("image2.png");      
> 
> I tried 
> iiaImage.setImage("@image2.png");     
> 
> as well to no avail. 
> 
> any suggestions? 
> 
> --
> View this message in context: 
> http://apache-pivot-users.399431.n3.nabble.com/urls-tp2962645p2962645.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Reply via email to