I'm seeing a similar error to that described in RaoulDuke's post.
When I enter sample code from the layout tutorial:
var Layout = require("Layout");
var layout = new Layout( {
type:"txt", font:"6x8", label:"Hello World"
});
g.clear();
layout.render();
I get the following error:
>Uncaught Error: Function "txt" not found!
at line 2 col 373
...c)h[k.type](k)})}};h[d.type](d)
^
in function "layout" called from line 4 col 152
...ct.h-f.h>>1));this.layout(f)
^
in function "update" called from line 1 col 203
....updateNeeded&&this.update();var b=g,f={"":function(){},txt:...
^
in function "render" called from line 1 col 15
layout.render();
^
with version 2v16.1 (both on the emulator and my BangleJS 2). I've turned off "Shorten variable names" in the emulator as suggested by the earlier post.
If I run it as an application a 2nd time on the device, it works as expected. What is different?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm seeing a similar error to that described in RaoulDuke's post.
When I enter sample code from the layout tutorial:
I get the following error:
with version 2v16.1 (both on the emulator and my BangleJS 2). I've turned off "Shorten variable names" in the emulator as suggested by the earlier post.
If I run it as an application a 2nd time on the device, it works as expected. What is different?