The leading slash is now required in BXML. A leading "@" symbol means "relative to the current file", whereas a leading "/" means relative to the class path (i.e. absolute).
However, you appear to be loading your images programmatically rather than in markup - what exactly are you doing with the defaultImage value? There may be an easier way to accomplish what you need. G On Dec 8, 2010, at 7:21 PM, Luiz Gustavo wrote: > Hi, > > > I had writen an application using Pivot 1.5.2 that used a gif image for a > button, and in the Java source I used the path without a "/" in the begining > of the path, like this: > > private String defaultImage = "img/default.gif"; > > Now, rewriting the application in Pivot 2.0 I had to put the "/" in the > begining of the path (otherwise I receive a NullPointerException that tells > me the IconURL is null): > > private String defaultImage = "/img/default.gif"; > > Are the images referenced by an absolute path now, and not relative to the > bxml script? > > -- > Luiz Gustavo S. de Souza > > http://luizgustavoss.wordpress.com > http://luizgustavoss.blogspot.com > http://twitter.com/lugustso
