Log In  

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?

P#104099 2022-01-02 10:47

1

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

P#104121 2022-01-02 18:05 ( Edited 2022-01-02 18:05)

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.

P#104142 2022-01-03 00:51

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.

P#120915 2022-11-18 16:11

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

P#120919 2022-11-18 17:05

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.

P#120921 2022-11-18 17:25

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 ?

P#120923 2022-11-18 17:40

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.

P#120926 2022-11-18 17:47

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.

P#120931 2022-11-18 18:03

In programs such as Notepad, Libre etc. it's standard practice to ask to save if alterations have been made.

P#120934 2022-11-18 18:37

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.

P#120935 2022-11-18 18:43

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.

P#120936 2022-11-18 18:47

sure; ya a config option would be fine

P#120937 2022-11-18 18:50

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.

P#120940 2022-11-18 18:54

"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.

P#120942 2022-11-18 19:08

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.

P#120969 2022-11-18 22:25

"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.

P#120971 2022-11-18 22:36

@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 ?

P#120972 2022-11-18 22:39

I use a mac. So really it's "command-s" and "command-w".

P#120985 2022-11-19 11:31

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.

P#121000 2022-11-19 18:22

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 03:17:44 | 0.045s | Q:33