Pages: [1]   Go Down
Author Topic: How about a "save, verify and upload" button  (Read 964 times)
0 Members and 1 Guest are viewing this topic.
Turku
Offline Offline
Full Member
***
Karma: 0
Posts: 220
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is, all those three together. If errors are found just return to editor and show the error message.

Logged

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

The problem with adding save to the existing verify (compile really) and upload button is that if your edited changes  to the original sketch results in compiler errors or if the changes don't actually work in the program then you have to manually undo your changes as they would have been 'saved' if the source sketch file. This would slow things down in reality. Save should be it's own explicit operation via either the save button or when you close the sketch window as it is presently.

Lefty
Logged

Turku
Offline Offline
Full Member
***
Karma: 0
Posts: 220
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But isn't saving necessary in order get the changes registered.

That is, I'm doing my programming like this:
I edit whatever I need in the source file.
Then I save my changes. The down arrow
Compile (verify) by pressing "play" button.
Upload by pressing "arrow to the wall" button.
if(when) not working goto begin

Is the the saving not necessary.

Expesially compiling takes time, and waiting for compiler to stop is getting irritating when I have done it too many times in a row.

Logged

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

But isn't saving necessary in order get the changes registered.

No, a upload button recompiles the sketch directly from the editor (with whatever changes you have made sense opening the sketch file) and uploads it without saving or changing the original source. The save gets done by either pressing the save button or when you try and close the session it will ask you if you wish to save the latest edited version to the sketch folder, replacing the original sketch.
That is, I'm doing my programming like this:
I edit whatever I need in the source file.
Then I save my changes.
It's not nessesary to save the changes, you can go ahead and upload at that time. Saving can be defeered to later as stated above.

Is the the saving not necessary.

That is correct, not need at that time. You have the option later to save the latest changes or not and the original sketch file will remain as before you opened the session.

Lefty
Logged

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3480
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In my opinion there should be no "save" in any IDE: It should always autosave AND provide proper version control. Unless you have version control save is just a very poor substitute for missing version control.

In fact and IDE should know about two kinds of versions:
1) implicit versions (like triggered by implicit saves) and
2) explicit versions (requested by the users).

Explicit versions must not be deleted except if the user requests this.
Implicit versions may be deleted any time in order to preserve space. Implicit versions should not be deleted if they are not older than an hour.

This would resolve these issues.

Udo
Logged

Check out my experiments http://blog.blinkenlight.net

Turku
Offline Offline
Full Member
***
Karma: 0
Posts: 220
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for your answers Lefty and Udo. Your posts have given me useful info about Arduino IDE.

It is good to know about how upload works. It is not very "industry standard", but if it works it helps.

Udo, is "undo" working well in Arduino environment. Personally I'll take any version control, if it works, that is: it works without any extra steps.
Quote
Implicit versions may be deleted any time in order to preserve space. Implicit versions should not be deleted if they are not older than an hour.
Or some other time, or numbered like save_1, save_2 and so on.

Leif
« Last Edit: May 26, 2010, 07:43:33 am by LMI1 » Logged

Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
That is, I'm doing my programming like this:
I edit whatever I need in the source file.
Then I save my changes. The down arrow
Compile (verify) by pressing "play" button.
Upload by pressing "arrow to the wall" button.
if(when) not working goto begin

The verify/compile step is not necessary. When you press "upload" it will compile first.
Logged

Turku
Offline Offline
Full Member
***
Karma: 0
Posts: 220
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep. Now I know.

Perhaps the name of the upload button should be changed, perhaps something like "verify/upload" would be better.
Logged

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

Quote
Perhaps the name of the upload button should be changed, perhaps something like "verify/upload" would be better.

If I was God, I would have named Verify > Compile and named Upload > Compile & Download. But I'm not and I'm also not a artist  ;D

Lefty
« Last Edit: May 28, 2010, 12:42:16 pm by retrolefty » Logged

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
... I would have named Verify > Compile and named Upload > Compile & Download.
This twist on perspective is interesting - to me it makes sense with upload. That is I'm on the PC uploading code to the Arduino.

It could have been the reverse. That is typing the command on the Arduino to download data from the PC (as I would upload/download to/from the Internet), but I'm not.
« Last Edit: May 28, 2010, 01:42:01 pm by borref » Logged

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3480
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why not call it "flash". This leaves no doubt about the direction since it is highly unlikely that the PC will be flashed smiley-wink

The "upload/download" issue is the same as the which is the client and which is the server issue. Always confusing.

Udo
Logged

Check out my experiments http://blog.blinkenlight.net

Pages: [1]   Go Up
Jump to: