Web IDE - what code is loaded at startup?

Posted on
  • What code does the web ide decide to load when it starts up?

    I assumed it had loaded my last saved file, I made a few changes to the code & saved it (overwriting my source file).

    The problem was it was old code that was loaded, not the most recent & I lost some previous changes (not too bad, only took about 30 mins to redo).

    It may be better if the IDE opened up with a blank code editor - at least we could be sure what was loaded.

    Also: How does the auto-save to Chrome's Cloud Storage function?

  • Hi,

    Sorry about that :(

    The editor saves the last code you uploaded to the board - I've been wanting to get it to save what was there when you last closed the editor, but for some reason I haven't been able to get that to work yet! You'd think it would be simple.

    That's basically how the auto-save works anyway. Of course what's in the editor gets properly confusing if you're running two PC with two copies of the Web IDE signed in on the same account :(

  • Thanks Gordon. I've now decided to keep my code in a DropBox folder which automatically stores previous versions so I shouldn't lose anything again (so long as I remember to save!)

    Oh - Congratulations on reaching the £15K for the Pico - it didn't take long - 2 days!!!

  • @Gordon

    If the IDE runs on chrome, maybe you could try to use localStorage. You could JSON.stringify the code and save it on the storage and when you open the IDE, all that has to be done is JSON.parse.

    No clue if it works like that in the IDE, but with browsers it works perfectly :)

  • @user49360 that might be better - the issue is knowing when to save, but I guess I could just do it every few seconds.

    The reason I didn't do that with the synced storage was the rate limiting, but hopefully local storage won't have that.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Web IDE - what code is loaded at startup?

Posted by Avatar for DaveNI @DaveNI

Actions