Hi. The W and S keys are close together and I find I often hit Control-W (quit) by accident when I mean to hit Control-S (save), and therefore lose unsaved work.
Could Pico-8 prompt before quitting if there is unsaved work? Similar to how it prompts to overwrite files when you save or export?
oh that’s too bad! I always use the shutdown
command (which prompts), never keyboard shortcuts. alt-f4 closes the window from the window manager or operating system, so pico8 doesn’t have a chance to prompt to save, but ctrl-w must be handled by the program so this could be changed.
about lost changes: run the folder backups
command to find automatic backups
All operating systems notify the application when they are about to close a window and allow the application to prevent it being closed until work is saved, so this could be done for Alt-F4 (in Windows) and clicking on the window's close button, as well as hitting the Control-W key combo in the app.
I'm new to pico8 and this is my biggest problem atm, I'm constantly clicking 'X' to close window after testing a bit of code and expecting to go back to the program (comes from coding in notepad++ with Altirra running the program)
Confirm shutdown would be a big plus.
you could run pico-8 in borderless or full-screen mode to avoid that!
or edit your p8 carts in your regular text editor and configure a shortcut to run it with pico-8, then closing would be ok. see https://www.lexaloffle.com/dl/docs/pico-8_manual.html#_Using_an_External_Text_Editor
I'm just learning pico8 so prefer to do it in the pico environment atm, and I need to be in a window so I have access to the manual and tutorials. I might go to an editor later once I'm more familiar with it.
Regardless, a program that could have a lot of additional work in it just shutting down without a warning is extremely frustrating. Of course I could save my work more regular, or find it in a backup folder, but that's not a solution it's a contingency plan.
The online edition of Pico-8 in Firefox DOES warn you if you are about to accidentally close your work, @dredds, either in clicking the closebox or pressing CTRL+W.
CTRL+W has no affect in the offline edition.
In what environment are you in where you can press CTRL+W and the task will close without prompting you ?
I'm working with the standard download in windows mode in windows 10. Alt-f4 (which I never use) or clicking the close X in corner of window closes the app with no notification.
Hi @preppie.
Yep, I'm certain it does. No, what he mentioned was CTRL+W. That's where I think it doesn't make sense to me.
Pico-8 the executable will close without prompt via ALT-F4 or clicking the closebox. That is a standard practice in most Window programs.
In programs such as Notepad, Libre etc. it's standard practice to ask to save if alterations have been made.
I've pulled a cmd w myself before and it stunks, but honestly I would prefer not annoying me in the middle of shutting down the window everytime. Like the ease of cmd s balances out a missclick but IDK.
An option in config file would allow people to have it the current way or a prompt. It's a 5 minute job and won't effect anyone who doesn't want it to.
As long as it is optional, @preppie. Personally I cannot see someone accidentally typing ALT-F4 or accidentally clicking the closebox.
Stranger things have happened though.
If it's purely optional then I suppose it wouldn't hurt to add.
Marked SUPPORT with gold star.
Now you just need to let @zep become aware of this.
"Personally I cannot see someone accidentally typing ALT-F4 or accidentally clicking the closebox."
I do it all the time lol. I'm used to coding for the Atari 800 in textpad then clicking F7 to test, which boots up the Altirra emulator. As there can be only 1 instance of Altirra I have to shut it down after the test to be ready for a future code test. So my automatic response in Pico8 after testing a bit of code is to shut it down.
I try my best to remember to ctrl-S but even when I do I have to go thru the process of booting up pico again and loading, and if i forget ctrl-S I lose a bunch of work.
To add on to this @preppie, GFA, an earlier programming language, gave you an option to automatically save your work to BACKUP followed by a date and time. You could specify how many of these there were rotated.
I configured it for 12 in total rotations and automatically saving my work every 5-minutes, giving me a 1-hour margin of backup in case the program crashed or the computer crashed or something, or even if I saved my work and it was worse off than what I did before. That happens if you code into the wee hours of the night. :)
So, yes, I would like that too for Pico-8, the ability to auto-save your work after every 5-10 minutes or so. All configurable.
That would assist this accidental press of ALT-F4 or clicking the closebox.
"Personally I cannot see someone accidentally typing ALT-F4 or accidentally clicking the closebox."
Control-S saves the file. Control-W closes the window and quits Pico-8. The S and W keys are right next to each other. It's really easy for the finger pressing the S key to also press the W key while entering the Control-S combination.
@dredds, where are you pressing CTRL+W for it to close down ?
I cannot get this in Pico-8 when run as an EXE in windows.
Nor can I get this without the warning panel I showed above if you are using the Online edition of Pico-8 ?
Where is Pico-8 closing for you when you press CTRL+W ?
Ohh ... Macintosh, @dredds. You had no way of knowing if this behavior was mimicked in Windows. So ... yes, if "command-w" is exiting without prompting, that definitely needs to be looked at.
Alt-F4 I still think is a bit much to accidentally press, however if it was part of the configuration for Pico-8 where it could be turned on or off, to prompt before exiting always, or to have it as it is now, that would be fine.
Just here to say on Mac there's still no saveprompt on closing with unsaved changes. I've found the backups folder, but without a warning I often don't realise I even need to look there, and will continue working on an older version and screw myself sooner or later.
[Please log in to post a comment]