espruino / EspruinoDocs

See http://espruino.com for the complete Espruino Documentation - many links in this repository will not work
http://www.espruino.com/
Other
260 stars 284 forks source link

tutorials/Bangle.js App Settings.md #652

Closed TheLogan closed 7 months ago

TheLogan commented 2 years ago

eval(require("Storage").read("myapp.settings.js"))(()=>load());

results in the following: Uncaught Error: Function not found! ...).read("myapp.settings.js"))(()=>load());console.log('started...

I've also attempted to call load() directly, and on my bangle.js 2 it doesn't seem to do anything.

gfwilliams commented 2 years ago

What's in myapp.settings.js?

Is it that you missed:

This is great for testing, however to create a settings app, you must remove the (load) from the end of the code, so it should look like this: