You are reading a single comment by @Gordon and its replies.
Click here to read the full conversation.
-
Where did you see the example using require("Storage").write? I'm trying to remove references to it for this reason :(
@Gordon Found that example on the "step 2" Workshop page from Node Conf
and also on the BangleApps Readme in the "offline" section.Thank you for the suggestion to double-escape the new line chars! Will try it out later today.
I think your issue is actually to do with how templated Strings are handled. I notice you have
\n
inside a string, inside the templated String in the call toStorage.write
. The\n
gets interpreted by the templated string, not the 'normal' string as you wanted. Easier to explain with an example:So unfortunately it's not quite as easy as just adding backticks on either side of your code. It normally works, but not when you have escape sequences in Strings.
Where did you see the example using
require("Storage").write
? I'm trying to remove references to it for this reason :(What I'd suggest is you clone the BangleApps repo and copy the example app to a new directory and modify the files: https://github.com/espruino/BangleApps/tree/master/apps/_example_app
You can then either host your own BangleApps repo and then use the app loader to write everything to the watch, or you can just use the new Web IDE storage feature (the cylinder icon in the middle of the screen on http://www.espruino.com/ide/) to upload the files from disk manually.
I'm working on extending the IDE such that you can choose to upload directly to a file, which should really help with development.