Auto-save feature?

Is there a way for XOJO to automatically save a copy of your work at set intervals? There have been a few times where I’ve coded for over an hour and quit XOJO while neglecting to save the updated project. By golly, this can be irksome.

I have other software that can do this by generating a copy of of the project file in a backup folder every 10 minutes or so with a time-stamp coded in the filename.

When you quit it should ask you to save your changes…
Is it not?

No, but you can easily create a build step script (from the Insert button) that causes Xojo to automatically save your work every time you run or build your app.

All you need is:

DoCommand "SaveFile"

Gavin: thanks for the suggestion.

Tim: Yes, it asks… but somehow I have, on more that one occasion, managed to hit the wrong button. (I’m usually fatigued at this point).

I think what throws me is that on the Mac, the dialog window shows three buttons: “Don’t Save”, “Cancel” and “Save”. In my case, the first, “Don’t Save”, is shown with a blue highlight (focus) ring while the “Save” button is colored solid (blue) as is typical of a default button.

My tired eyes and fatigued brain seem to be drawn to click the highlighted “Don’t Save” button, rather than the default “Save” button. I’m now wondering whether ancient versions of the Mac OS tended to have the default or least destructive button to the left, rather than to the right, and that I’m just using old muscle memory?

One might ask: “Why is there a focus ring on any of these buttons” ?

There isn’t normally. If you want to switch it off, go to System Preferences, Keyboard and then click the Shortcuts tab. At the bottom you will see “… press Tab to move keyboard focus between:” and for you “All controls” will be selected. However, select “Text boxes and lists only” and you’ll have the OS X default.

I suggest you get into the habit of hitting Command-S randomly and frequently, like all good OS X developers :slight_smile:

Current OS X and Windows already have (since last year or so) the auto-save feature.

@Emile: which I always switch off because this behavior drives me nuts.

Amazingly enough, there seems to be no feedback case for Auto Save la OS X and Windows.

The only one I found was <> which requests auto save ( la Xojo obviously) upon Analyse Project.

That said, I am not too sure about an autosave la system (or like Word does) would be adequate. Or even the DoCommand script.

There are instances where I try thing in run mode and for some reason mess up the project in such a way that I finally scrap the whole thing without saving because it has become too monstrous. I would certainly not want an overzealous auto save to ruin my working project with the experiment I run.

Maybe an incremental save, with project1, project2 and the like at each save would be a much better solution, allowing to get back to a previous version if the project has become too bug ridden.

But that feature remains far, far behind others of more importance. I would hate Xojo engineers to spend precious time implementing it while much more pressing things are on the plate.

As long as regularly manage to crash the debugger whenever I do more than a couple of steps in it I’ll keep my DoCommand script. For the rest there is Cornerstone. If I manage to screw that up then I need a better brain.

There are 2 goals here: not to loose data and make this fit seamlessly into the workflow. So far the DoCommand script works fine for both. But as usual everyone has a different workflow.

This right here. I don’t want some autosave feature screwing up my tests.

This as well. It should be a muscle memory habit for anyone who has used a computer ever :stuck_out_tongue:

Where is that feature located!?

Or hidden…!? Because there is no such setting to be found in Edit >> Options… where most other things can be found!
I also think the auto saved back-up feature would be nice!

I press Ctrl-S regularly, it’s not the issue. For me, the concern is rather that I’d like to save old code… or if I delete things as I later regret. It’s good to restore from an older copy.

I do not recall exactly. You have to click “do not close windows” in the System Preferences (General ?).

And also, try with preview for example, do not close the window before quit §quit without closing any window). With a little luck, when you open back Preview (or TextEdit), all previous windows (with saved contents or not) reppears just like if you do not quit.

That is for OS X.

For Microsoft products, lets pray (I do not know).

I press Ctrl-S regularly
And I just forgot before the crash. Norman will say that Xojo will ask you if you want to get back the unsaved changes on the next run and I will answer that the project will be considered as a brand new one :frowning: (talking about the project file creation).

[quote=210715:@Jakob Krabbe]Where is that feature located!?
There is not “auto-save” feature as people are discussing here

The IDE will save a copy of your work in a temporary location when you hit run

But thats not “auto save” like people have asked about here