Hi and welcome to Pivot,
sorry only time for a fast response now ...

This is a question that many times arise, and it's due to the resource
loading, we use a standard way in Java ... but I agree that
not-so-simple.

A working sample here:
http://pivot.apache.org/tutorials/labels-and-image-views.html
for example here you can find this:

<ImageView image="/org/apache/pivot/tutorials/clock.png"/>

for example look inside tutorials/src/... all Kitchen Sink java and
bxml sources.

So in short, any image to load must be in classpath, but the trick
here is that you have to give its path (absolute to your sources
folders) like the Java package of its current position.


Maybe for a future release we could think of something more like
Spring where given a resource name (in taht case a bean unique name)
it's searched in alla classpath and if found loaded, but of course
this has more overhead ... but I have to verify.


Other than Tutorials, you can find many small tests/samples even under
our tests subproject (in sources).
Tell us if you need more info/help.

Bye,
Sandro

Reply via email to