Jump to content
357mag

Quite confused about how to save a project

Recommended Posts

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 by 357mag

Share this post


Link to post

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 by programmerdelphi2k

Share this post


Link to post

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

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

C++ Builder builds your project faster than Visual C#. Maybe because C++ is a compiled language.

Share this post


Link to post
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

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 by 357mag

Share this post


Link to post
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 by Remy Lebeau

Share this post


Link to post

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
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!

 

 

 

bds_V1WB8Nhisf.gif

Edited by programmerdelphi2k

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×