We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've lost work twice thanks to processing crashes... the ease of hitting cmd-R makes me for get to hit cmd-S, and then I suspend, and sometimes processing is just out to lunch when I come back. Is there anyway to make it so cmd-R autosaves?
Answers
It seems so weird that switch to js forces a save, and requires typing in a filename, but then I could be editing something (that I've clearly given a filename!) and run it and run it then processing dies and I lose all my changes.
which operating system are you using?
i'm on linux. and processing 1.5.1. if i create a sketch and run it (without saving it) i get a temporary file in /tmp/sketch_nov01[random_hex_digits]temp called sketch_nov01a.java which is the pre-processed version of my sketch with all the java bits added to it, but still recognisably my sketch.
windows and mac will probably do something. so even if processing crashes there is a chance that you can retrieve your code.
that said, losing work because you haven't saved it is the 'dog ate my homework' of programming problems.
This is OSX. I recreated the work since then.
In a normal programming environment, I'd agree that it'd be more Dog Ate My Homework. But I was doing many, many successful iteration runs on my commute home - by hitting cmd-r. And then, in a hurry to jump off the train, I just shut my lid. When it restarted, Processing was beachballing like mad.
I have a totally untested theory that it's caused by it working in a Dropbox folder, and so Dropbox changes out some stuff from under it and it becomes confused. But that's just a wild guess.
I've been trying to be more mindful with a double cmd-s, cmd-r. (Or when I'm in processing.js mode, I'm more compelled to save a lot., since it's cmd-s, switch app, cmd-r (for reload)). But I think it's a UI fail to have the default be "make all the changes and run you want! We'll probably remember to prompt you to save later"
I run lot of sketches (often copy / pasted from this forum) without ever saving them. That's one of the nice things in Processing!
When I do serious stuff, I save it, and I just have the habit to hit Ctrl+S often, not only before runs.
Well, it does save the code somewhere in the tmp dir for compilation anyway, so that's a way to salvage it.