Wierd behavior of the txt editor

Post » Mon Jun 19, 2017 11:54 am

I'm not submitting a bug yet because maybe I'm doing something wrong.

I noticed that when I edit a project txt file, sometimes changes aren't saved. They disappear after reloading the project or closing and reopening the file. On other occasions they save correctly. It's as if I occasionally forgot to press a 'save the txt file' button that doesn't exist (?).

At what point does the editor save changes to the project file?
B
16
S
7
G
1
Posts: 161
Reputation: 3,131

Post » Mon Jun 19, 2017 12:54 pm

@pirx Changes within both the text editor and the data editor are committed only when the editors are closed. Saving or previewing the project will perform a "temporary commit" where the changes are used only for that action.

I expect the editors are not marking your project as changed so when you close it a prompt to save changes doesn't appear.
Scirra Employee
B
5
S
2
Posts: 124
Reputation: 879

Post » Mon Jun 19, 2017 2:39 pm

@Nepeo Aaah, thanks, that explains a lot.

I wasn't aware of these mechanics, so I got confused as to what and when gets saved and what doesn't. Case closed.

PS. Just as a piece of feedback, I think this is a bit unintuitive. The temporary commit gives the impression of having saved changes during edit time while in fact they are not -- and there's no indication to the user. I was just playing around this time but I can imagine someone losing a chunk of work that way. This might be worth taking a closer look at some point in C3's future.
B
16
S
7
G
1
Posts: 161
Reputation: 3,131

Post » Mon Jun 19, 2017 5:37 pm

@pirx yup I agree it's not intuitive, I've been meaning to revise it but the problem is a little more awkward than it's face value. Depending on the size of the text file it can take a noticeable amount of time to save it, so saving after each change would make the editor really laggy and saving on an interval adds the risk of people occasionally seeing the old version.

There's been a few suggestions to add a manual "save" button for these 2 editors, but I don't think this really solves the problem and it would mean having 2 save buttons on screen at once ( one for the editor and one for the project ), which would be confusing to say the least.

If I can fix the "isChanged" indication then UX wise it will work as if every change is saved, but in reality will only save when it's needed.
Scirra Employee
B
5
S
2
Posts: 124
Reputation: 879


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests