2

I have made a custom library in qooxdoo for reuse in another qooxdoo applications. I followed the instructions here: http://manual.qooxdoo.org/3.5/pages/development/library_custom.html

and it works, in that it finds the classes and I can use them in my new code. However, some of the classes are gui elements which themselves references resources (images) in the libary. These are marked:

@asset(path/to/resource)

However, when I use the generator, the source generation does not pull these resources into the new application. However, when I use build, it does, and the resource directory for build looks like:

resource
|--->application
|--->library

So my question is, how can I make the generator copy the library resources into the source/resource directory as part of a source build so that the source application will have all the relevant resources?

phil_20686
  • 4,000
  • 21
  • 38

1 Answers1

2

Files are never copied for the source version, they are instead loaded from their original location in the file system. For an included library's resources, the path is computed from the location of its Manifest.json file (as configured in the including library's config.json) and the resource path defined in the library's own Manifest.json. You can check this value by calling

qx.util.LibraryManager.getInstance().get("bar", "resourceUri");

in the main application, where "bar" is the library's name space.

Daniel Wagner
  • 2,717
  • 1
  • 21
  • 14
  • @phil_20686 You can see how this is true as even the resources of qooxdoo itself are not copied to an application's *source* version. – ThomasH Apr 27 '15 at 22:07