Glances: any example in SDK? Strange error in simulator.

Finally decided to move to glances support.

That's odd no example in SDK.

Ok, found some on this forum. Added and got error during runtime.

I have no idea what is wrong in this code:

using Toybox.WatchUi as Ui;


class Project_MyGlanceView extends Ui.GlanceView {


    // Load your resources here
    function onLayout(dc) {
        lbl_SensorLabel = Ui.loadResource( Rez.Strings.SensorLabel );  // that line causes Error.

Error: Illegal Access (Out of Bounds)
Details: Failed invoking <symbol>
  - onLayout() at C:\Garmin\Work2\Project_My\source\ 0x10000879

Does it mean loadResource forbidden in onLayout in glances? I do really need localized strings on layout.