+7
Voting

Saving in JS

Jackie Roos 6 years ago in Applications / Studio (Server editor) updated by Andrey S 3 years ago 11
Clicking on SAVE in the JS editor does not save the JavaScript into the project.

The result is if something happens, eg PC shutsdown due to windows updates while you are at lunch, the JavaScript is lost.

Please change so that saving in the JS editor saves to the project.

Hi
This is a major issue. This means to save the script that I am working on, I need to either
1. close the JS and click on SAVE in the GUI Editor
OR
2. Save to an external file

Neither of these solutions are acceptable.

I am requesting a feature change as this is a bug - a design bug.

Please change so the save in the JS saves the script with the project - the script is part of the project!!!!!!

thanks
Jackie, the script is a part of project, but we are not agree to make this button works as a global Save button.

Our vision of changes for the good work of this functionality:

Change the "Save" button in [JS] window to "Snapshot" button.

It will make a script copy in "Backup" folder (name-date-time.js).
When you press [x], [OK], [Snapshot] (and every minute, for exampe) the Editor automaticly makes a temporary file of all the scripts in UI (~projectname.js.temp) on the same level where project saved.

So, the temporary file recovers your script if your PC turnes off without project saving (incorrect closing).
The backup file (snapshot) makes you able to recover the script from -date and -time.

When you close [JS] window and closing Editor by the normal way, it asks: [Save Project] > [Yes] > all the project saved.

What do you think about it?

Hi,

Where is the OK button, I don't have that any more. I close the JS editor with the X in the top right and it asks to save then.

Thanks,

Roger

Hi Roger. On your screenshot it is cutted by the Start menu. Try to minimize and maximize it again.


Hi,
The 'snapshot' method will be fine, however
- it should snapshot when the SAVE button in the JS Editor is clicked, NOT when leaving the JS Editor by clicking on the 'x' or 'ok' buttons
- the SAVE button in the JS Editor allows for snapshotting of multiple scripts that might be worked on at the same time. So the name would be (~projectname.scriptname.js.temp)

The reason why it needs to be by the SAVE button:
I tend to spend 4-6 hours at a time working in the JS editor without going into the GUI editor at all, ie not clicking on the 'x' or the 'OK' buttons. I run the emulator from the JS Editor, and press buttons on equipment and interpret the feedback etc.

As long as the SAVE button in the JS Editor actually saves/snapshots the JS Scripts, I will be very happy.

thanks
Hi, that's what I meant:
- it will make a snapshot on button press in JS window.
- it will make a temporary file automatically or when you leave the JS window + every minute.

So the name would be (~projectname.scriptname.js.temp)
yes, but it is easier to make a snapshot of all the scripts in single file. Many users create more then 10, 20, 30... script files, and the separated .temp files will not look nice.

If we make a backups and .temp files, you'll not need a global Save in JS window. Your script will be safe.
Global Save will be needed only when you want to close the editor (or GUI) at all.

PS: you don't need to press Save when start Emulator. It applies the last changes automatically.

Ok, so we have a
request and a vision of future changes, so we are able to mark it as Idea (I'll do it with this topic) and vote it.

"Snapshot" for js-scripts, "Save" for project, backups for irpz-files, backups for js-files -- I think it is all too diffical.

Just remove button "Save" from the panel in JS-editor, and everybody will press Ctrl + S to save their work.

If Studio need to save js-files befor Emulator start save all project. Similarly, save project before uploading project to panel.


P.S.: Because of this dissonance with the buttons "Save project" and "Save script" I lost my work twise.

Hi,

Ok, to get it back, I had to reset to the Default Panels..

I run the emulator a lot so as long as the save is happening then, its ok.

Thanks,


Roger

Useful idea!


.. many hours of work were lost ..