Autosave on Build

I’d love an option to autosave my project when I run it or press build. Other IDEs offer this and it is beneficial for people (like me) that forget to save work and then something goes wrong with the app/IDE/OS/something else, and you lose work.

Hello,
You can add a script that do the save command before the Buld step with the following code

DoCommand("SaveFile")
3 Likes

Are you sure you want it to save before run. It could ruin your saved project when you are simply trying out some changes to your code.

1 Like

Save as frequently as possible. That’s what source control is for.

1 Like

I do, but if you are just spitballing ideas I wouldn’t. Sure, if it was a major set of changes I would make a branch, just not for tiny “what ifs”.

@Yadda_Yadda did you have a link to the feature request? Just posting it here isn’t actually a feature request, this is only a place to post those that you’ve added to the tracker:
https://tracker.xojo.com/xojoinc/xojo/-/issues/

The IDE is also supposed to be saving as it goes. A hard crash should present you with an option to recover your code. The protection doesn’t save in the normal place you do. It’s more auto recovery than autosave. I’m pretty sure I’ve seen people report this as not working recently.

Actually, there’s already a request for it, nobody seems to have given it a thumbs up though.
Auto Save File on Run or Build
https://tracker.xojo.com/xojoinc/xojo/-/issues/56357

I use this. It’s a balance. I have more times I have lost changes than saved bad changes. I have daily backups for bad changes.

My memory of what actual changes I have made in every past hour is almost nil.

thanks, i have put a thumbs up on that tracker.

adding the line to the build process is perfect, thank you. it’s a habit i got into over the years after losing work.

That’s another good reason to use source control. Something like GITHub or even one configured locally. you can see the changes you’ve made from one checkin to the next. You can even revert commits you’ve made if need be. Reviewing the changes makes writing release notes a lot easier as you can’t forget to add one.

Given the IDE now supports text projects in every version it is much easier to work with. Even on GITHub projects can be private. Sure it doesn’t stop their AI from learning from them.

yep - i concur on source control. but i want to work on the file without checking in/out, just a local save for the moment. might not be the best practice, but it works for me!