Complete

Barrel build name needs to be the same in the manifest.

Thanks Jim!

Drawables, Strings or JSONData can't be used in Barrels

Using Visual Studio Code I'm not able to load resources from a Monkey Barrel. If a resource call is mistyped or not present I get a compilation error, but once it's referenced at runtime I get a "Symbol not found" error.

Parents
  • How are you trying to reference things?  As a simple test, I added a string to one of my barrels (it already has a custom font.)

    <strings>
    <string id="MyName">MyIcons</string>
    </strings>

    In the barrel, in its initialize, I can reference the string fine with this.  The module is named ClockIcons.

    Sys.println("CI "+Ui.loadResource(ClockIcons.Rez.Strings.MyName));

    and in the main app (a watch face) with this, again with the module name:

    Sys.println("SB "+Ui.loadResource(ClockIcons.Rez.Strings.MyName)); 

    on the console:

    CI MyIcons
    SB MyIcons

Comment
  • How are you trying to reference things?  As a simple test, I added a string to one of my barrels (it already has a custom font.)

    <strings>
    <string id="MyName">MyIcons</string>
    </strings>

    In the barrel, in its initialize, I can reference the string fine with this.  The module is named ClockIcons.

    Sys.println("CI "+Ui.loadResource(ClockIcons.Rez.Strings.MyName));

    and in the main app (a watch face) with this, again with the module name:

    Sys.println("SB "+Ui.loadResource(ClockIcons.Rez.Strings.MyName)); 

    on the console:

    CI MyIcons
    SB MyIcons

Children