var bla = {
init : function() {
console.log("bla.init");
this.foo();
this.bar();
},
foo : function() {
console.log("bla.foo");
},
bar : function() {
console.log("bla.bar");
}
}
E.on("init",bla.init)
setTimeout(save,2000);
/* output
bla.init
Uncaught Error: Function "foo" not found!
at line 2 col 10
this.foo();
^
in function called from system
*/
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.
what is wrong with my sample code - any comments ?
online with WEB IDE
with E.on(): Uncaught Error.....