Without diving deep into the code, I suspect you can solve the issue by wrapping Bangle.removeListener('drag',onDrag) in an if (onDrag) { ... } or if (onDrag!==undefined) { ... }. So that if onDrag isn't defined anymore for some reason it will not try to remove it.
Regarding Module Font5x9Numeric7Seg not found:
I think I remember require()ed fonts are inserted at the top of the app.js file on upload from the app loader, much like modules. I think you could look at the app.js file (via Web IDE) after you installed it via the app loader and see that code prepended. Then you could copy that code into your app code to be able to run it from the Web IDE without going via the app loader (again, I think).
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.
Regarding
"onDrag" is not defined
:Without diving deep into the code, I suspect you can solve the issue by wrapping
Bangle.removeListener('drag',onDrag)
in anif (onDrag) { ... }
orif (onDrag!==undefined) { ... }
. So that if onDrag isn't defined anymore for some reason it will not try to remove it.Regarding
Module Font5x9Numeric7Seg not found
:I think I remember
require()
ed fonts are inserted at the top of the app.js file on upload from the app loader, much like modules. I think you could look at the app.js file (via Web IDE) after you installed it via the app loader and see that code prepended. Then you could copy that code into your app code to be able to run it from the Web IDE without going via the app loader (again, I think).