You are reading a single comment by @Ronin and its replies. Click here to read the full conversation.
  • I was following the tutorial of how to use the layout library: https://www.espruino.com/Bangle.js+Layou­t
    I was following the first part of the tutorial to have a basic string of text and wanted to try it out. When I pasted the code in the Web Ide and upload the code to the Bangle.js 1 emulator it gives an error:

    Uncaught Error: Function "stringMetrics" not found!
     at line 1 col 147
    ... b=g.setFont(a.font,a.fsz).stringMetrics(­a.label);a._w=b.wid...
                                  ^
    in function "txt" called from line 1 col 15
    ;if(f[a.type](a),a.r&1){var b=a._w;a._w=a._h,a._h=b}a._w=0|Math....
                      ^
    in function "c" called from line 1 col 1093
    ...a.filly)&&(a.filly=1)}};c(a),a.fillx|­|a.filly?(a.w=d,a.h=e,a...
                                  ^
    in function "update" called from line 1 col 197
    ....updateNeeded&&this.update();var f={'':function(){},txt:func...
                                  ^
    in function "render" called from line 7 col 15
    layout.render();
                  ^
    

    It is also weird because it says there is no errors in layout.
    Is there any way I can fix this?


    2 Attachments

    • Screenshot 2021-10-23 204513.png
    • Screenshot 2021-10-23 204616.png
About

Avatar for Ronin @Ronin started