User forums > Using Code::Blocks

Auto Save?

<< < (3/3)

johnfemiani:
Thanks for blaming VS and not me  :) .

However, I checked, and VS actually appears to save only the dependencies (whether they are in the project or not).

The problem is folks have been saying 'ALL' to mean different things;  All in the project or all files that effect the build. These are obviously different things.

Second, I think saving or ?prompting? to save dependant files would actually be smart, and that is my own opinion. If you have changed a file in your text buffer it is an easy mistake to expect that when you compile it will reflect those changes.  If you can not easily track dependencies I understand though.

However, if a compiler error refers to a line number and I click on it, it is not good at all for C::B to jump to a modified line in an unsaved buffer.  You have to stay on your toes to notice the asterisk in the caption. 

I have been using C::B for just a couple of days, so I am a novice user, but I have spent longer than I like to admit wondering why syntactically correct code was flagged as a syntax error by g++.  Those familiar with C::B may find it trivial, but I am sure I am not the only one who has stumbled over this.

John

Biplab:

--- Quote from: johnfemiani on September 03, 2007, 11:12:38 am ---The problem is folks have been saying 'ALL' to mean different things;  All in the project or all files that effect the build. These are obviously different things.

--- End quote ---

And thanks for blaming the helpful folks, too. Were you clear with your question in the beginning??


--- Quote from: johnfemiani on September 03, 2007, 11:12:38 am ---However, I checked, and VS actually appears to save only the dependencies (whether they are in the project or not).

--- End quote ---

As Thomas said, this is a plain stupid feature of VS. My included file could stay anywhere in the world and it may be in the nth level of dependency tree. So just because I opened that file in any editor or even in C::B and changed it, C::B should hunt for that file which I've just edited and not saved ??? !!!

Instead of writing thousands of lines of code to support such feature, I'd take the simpler path. I'll add it in my project.

thomas:
Imagine the following happens:
You are working on project B when you remember that you have some code in project A that you could reuse. You open the corresponding file, but you see it doesn't fit 100%. No problem, you make some changes, copy the code, and paste it into project B. Half a year later, you work on project A again, but you notice it doesn't work any more because someone overwrote your sources. Good job you don't have a backup, either, and you can't remember what modifications you made 6 months ago.

Or, imagine this:
You have a system header open because you wanted too look up some function's declaration, or whatever. You forget about it, and while you're working, you do a multi-file search+replace.
As it happens, this replaces something in your system header too, but you don't even know (because you hit the "All" button on the first hit).
You try to build your project, and it fails, and you have no darn idea why. Sure enough, you can download the system headers again, copy a pristine header to your include dir, and everything works again. However, with any luck, you waste 6 hours of searching for a stupid error that won't go away, and you just don't see why.

There are countless examples like this that could be enumerated. Modifying files that don't belong to a project is just evil.

johnfemiani:
 :(  I did not mean to "blame" anybody ...  I was trying to point out the original point of confusion.
One person meant something, and another person meant something completely different. The _developers_ on this forum seem to be very consistent but I think the first poster was referring to the VS-style autosave. I appreciate all of the rapid feedbeack this forum gets and I certainly dont want to upset anybody.

I am not convinced by your example because system files should be read-only.  Not realizing you had replaced an item in the file and pressing "Save All" could inadvertantly make the same change.  At least one extremely popular IDE that many C::B newbies may be migrating from uses the autosave-dependacies options with much success.

I am willing to end my discussion on this thread now because I think we all understand the issue and have establised our opinions on it.

Biplab:

--- Quote from: johnfemiani on September 03, 2007, 08:37:28 pm ---One person meant something, and another person meant something completely different. The _developers_ on this forum seem to be very consistent but I think the first poster was referring to the VS-style autosave. I appreciate all of the rapid feedbeack this forum gets and I certainly dont want to upset anybody.

--- End quote ---

I guess you are right. The first poster may be interested in VS style auto-save. But we've explained why we feel such feature is not welcome in C::B. So I'm not repeating them. :)

You'll find such unnecessary features in most of the commercial programs which consumes a huge amount of processing power. A commercial vendor needs such features to justify the Huge Upgrade Price, Huge Hardware Requirement (2GHz CPU, 1GB RAM, 2-3 GB HDD). The upgrade price also includes fixes of some bugs left in previous version. And all these resources are utilised, sometimes, to generate a simple 10 KB exe.

But our goal is quite different. 8)

Navigation

[0] Message Index

[*] Previous page

Go to full version