Pages: [1]   Go Down
Author Topic: Where'd my code go?  (Read 674 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yesterday I wrote a program so that I could get values from an IR distance sensor and use them to control MIDI. When I went to open it today, the file was just blank. Nothing at all inside.

Is there some special way I'm supposed to close the IDE to prevent this, or what? My computer didn't crash mid-edit or anything like that.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well when you close a IDE window, any code you have entered or changed from the original opening will be saved if you answer yes to the dialog window (which pops up when you close the window) to save, or it won't save any changes made if you answered no to that dialog. Could you have possibly clicked no instead of yes? I have never noticed the IDE 'losing' any of my programs.

 You always have the option to explicitly save or save as from the file drop down menu at anytime, without having to close the IDE window you are working in.

Lefty

« Last Edit: July 17, 2010, 07:28:42 pm by retrolefty » Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Version 0017 had some saving issues...
Are you using 0018?
I have also never come across the IDE 'losing' programs though.

Mowcius
Logged

Cape Town, South Africa
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino does not save when you compile/upload. IMO that is silly. I have lost several sketches when my PC crashed and I did not save.

Now I have an OCD about it...
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The Arduino does not save when you compile/upload. IMO that is silly. I have lost several sketches when my PC crashed and I did not save.
I would not want it to as I often do some modifications to a sketch, only to then upload it and revert back to the old version. Auto save might be good if you could chose to turn it off. Maybe a backup save rather than saving the actual sketch. Then maybe there could be something like you get on office for document recovery.

Mowcius
Logged

Cape Town, South Africa
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I would not want it to as I often do some modifications to a sketch, only to then upload it and revert back to the old version.

Most IDE's have the undo buffer persist beyond saving. That is what I would normally do.  Not sure if the Arduino IDE does that.
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Most IDE's have the undo buffer persist beyond saving. That is what I would normally do.  Not sure if the Arduino IDE does that.
Yeah but I mean big changes. More than a few undo commands.

I dunno, it might be ok.
Logged

Cape Town, South Africa
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess what we really need is automatic source control  smiley
Logged

Pages: [1]   Go Up
Jump to: