Thanks. However, I hit another problem last night: I now have this
Main file
var Clock = require("http://192.168.0.12/clock.js").constructor;
Clock file:
var Date= require("http://192.168.0.12/date.js").constructor;
Is there any issue with doing nested requires?
Note - I previously appeared to have corruption problems, so I turned on the 'throttle' option. It now seems to be missing some of the code in the second require - is there any chance the throttle setting only applies to the first file?
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.
Gordon
Thanks. However, I hit another problem last night: I now have this
Main file
Clock file:
Is there any issue with doing nested requires?
Note - I previously appeared to have corruption problems, so I turned on the 'throttle' option. It now seems to be missing some of the code in the second require - is there any chance the throttle setting only applies to the first file?
BTW - throttle is very slow :(
Thanks
Martin