357mag 2 Posted April 10, 2023 (edited) I'm kinda confused about how to save a project in C++ Builder. I mean in the File menu there is four options: Save Save as Save project as Save all So lets say I have started a new project (a Windows project, not console). So I'm working with a Unit file and a header file and whatever else. How do I save everything? I know that if I wanted to save the project under a different name than I gave it originally, I would use Save project as. Or I suspect if I wanted to save just one file under a different name, I would use Save as. But what is the difference between Save and Save all? How do you guys do it? And should I save the project right away after seeing Form1 come up on the screen? Or should I save the project after I'm done working on it for the day? But I've had problems in this area that's why I'm asking. Edited April 10, 2023 by 357mag Share this post Link to post
programmerdelphi2k 237 Posted April 10, 2023 (edited) basically, you save each file after create it. ... later, you can use "Save ALL" if more than 1 file was changed, else use "Save" if just 1 (current on editor) if you want change the file name, just do it on Project Manager tree, press F2 or Rename menu item on rightclick... now "save" it again. PS: Understand "Save AS" as "Make a copy and use it as the official file for this project". Thus, you will have the "old file" as a "backup with old code so far...", got it? Edited April 10, 2023 by programmerdelphi2k Share this post Link to post
357mag 2 Posted April 10, 2023 Just to change the topic only for a second, I've noticed that C++ Builder is faster and more responsive than Microsoft's Visual C#. Share this post Link to post
Remy Lebeau 1396 Posted April 10, 2023 2 hours ago, 357mag said: in the File menu there is four options: Save Save as Save project as Save all SAVE - save the current unit file using its current filename. SAVE AS - save the current unit file using a new filename. SAVE PROJECT AS - save the current project using a new filename. SAVE ALL - save the current project and all unit files using their current filenames. 2 hours ago, 357mag said: I know that if I wanted to save the project under a different name than I gave it originally, I would use Save project as. Or I suspect if I wanted to save just one file under a different name, I would use Save as. Correct to both. 2 hours ago, 357mag said: But what is the difference between Save and Save all? Save one file/unit, vs save all files/units. 2 hours ago, 357mag said: And should I save the project right away after seeing Form1 come up on the screen? Or should I save the project after I'm done working on it for the day? Save whenever you want. But, consider also enabling the IDE's auto-save options, too: https://docwiki.embarcadero.com/RADStudio/en/Saving_and_Desktop Share this post Link to post
357mag 2 Posted April 11, 2023 I have two GUI projects now in my folder but I noticed in my first project C++ Builder made the header file with a .cpp extension (Project Welcome Program .cpp). In the other project it gave the project file a .h extension (Project Simple Variable.h). Shouldn't these Project files be labeled the same? Share this post Link to post
David Heffernan 2345 Posted April 11, 2023 12 hours ago, 357mag said: Just to change the topic only for a second, I've noticed that C++ Builder is faster and more responsive than Microsoft's Visual C#. You mean Visual Studio? I think VS is a lot more robust and stable than RAD Studio which crashes a lot. Share this post Link to post
357mag 2 Posted April 11, 2023 C++ Builder builds your project faster than Visual C#. Maybe because C++ is a compiled language. Share this post Link to post
Remy Lebeau 1396 Posted April 11, 2023 10 hours ago, 357mag said: I have two GUI projects now in my folder but I noticed in my first project C++ Builder made the header file with a .cpp extension (Project Welcome Program .cpp). The IDE does not create header files with a .cpp extension, so you must have done that manually at some point. Share this post Link to post
357mag 2 Posted April 11, 2023 (edited) Both my Project File and my Source code file have the .cpp extension. The Source Code file has the correct extension, but does my Project File have the wrong extension? What extension should the Project File have? Can I change the extension to whatever it's supposed to be? Actually I just started a new project and when I look at the file tree in the upper right, one file it made is called Project1.cpp. Edited April 11, 2023 by 357mag Share this post Link to post
Remy Lebeau 1396 Posted April 12, 2023 (edited) 20 hours ago, 357mag said: Both my Project File and my Source code file have the .cpp extension. The Source Code file has the correct extension, but does my Project File have the wrong extension? What extension should the Project File have? Can I change the extension to whatever it's supposed to be? Actually I just started a new project and when I look at the file tree in the upper right, one file it made is called Project1.cpp. The main project file should be a .cpp file without an associated .h[pp] file, and then each Unit in the project is a .cpp+.h[pp] pair (or a .cpp/.h[pp]/.dfm triplet if the Unit is a TForm/TFrame/TDataModule). Edited April 12, 2023 by Remy Lebeau Share this post Link to post
Fraser 2 Posted April 12, 2023 I would like to have Rename As... under Save As.. on the File menu. I wasn't aware that F2 had any use until now. Share this post Link to post
programmerdelphi2k 237 Posted April 12, 2023 (edited) 18 minutes ago, Fraser said: I would like to have Rename As. you dont needs, in fact, because you have "Project Manager", just select the file (unit) and press F2 or right-click Rename! Edited April 12, 2023 by programmerdelphi2k Share this post Link to post