...ouch, Web IDE (v0.47.2) file path/name handling on load and save still somehow messed up... could not yet find the pattern to recreate what I noticed: sometimes the suggested directory on save and load are the same and sometimes they are different. I have also no pattern to explain which code is shown when opening IDE - I know it is for sure NOT always the last one loaded or saved, and the suggested directory for save and load are different from where the shown code comes from... and as said, sometimes different for save and load (not the same when loading from a different dir but not saving and then close and reopen IDE...)...
It would be 'cool' if:
a) there is just one directory default kept... the same for load and save, set on performed load and save
b) not only the directory is kept, but the file names as well...
c) a) and b) would allow to load and show the last loaded/saved code if unchanged. If changed, keep last loaded/saved directory and blank the file name if default (code.js) filename already exists, otherwise blank to avoid saving with a predefined name.
d) if save/load was not the last action - in other words changes were done after load or save - changed code is shown (with directory of last save/load kept), but file name blanked... (the IDE somehow keeps code... independent of last activities, directory, and file name. Why can it not keep last edited and not saved content.
I do not know whether the IDE / editor knows that the content is changed, and if not, how difficult it is to have it detected...
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.
...ouch, Web IDE (v0.47.2) file path/name handling on load and save still somehow messed up... could not yet find the pattern to recreate what I noticed: sometimes the suggested directory on save and load are the same and sometimes they are different. I have also no pattern to explain which code is shown when opening IDE - I know it is for sure NOT always the last one loaded or saved, and the suggested directory for save and load are different from where the shown code comes from... and as said, sometimes different for save and load (not the same when loading from a different dir but not saving and then close and reopen IDE...)...
It would be 'cool' if:
a) there is just one directory default kept... the same for load and save, set on performed load and save
b) not only the directory is kept, but the file names as well...
c) a) and b) would allow to load and show the last loaded/saved code if unchanged. If changed, keep last loaded/saved directory and blank the file name if default (code.js) filename already exists, otherwise blank to avoid saving with a predefined name.
d) if save/load was not the last action - in other words changes were done after load or save - changed code is shown (with directory of last save/load kept), but file name blanked... (the IDE somehow keeps code... independent of last activities, directory, and file name. Why can it not keep last edited and not saved content.
I do not know whether the IDE / editor knows that the content is changed, and if not, how difficult it is to have it detected...