Re: Bringing it all together.

From: Martin Harvey (Demon Account) (martin_at__nospam_pergolesi.demon.co.uk)
Date: 03/26/04


Date: Fri, 26 Mar 2004 20:36:02 +0000

On Fri, 26 Mar 2004 12:09:31 -0000, "Richard S Beckett"
<spikeywan@bigfoot.com.delete.this.bit> wrote:

>Also in the folder is About.pas. If I open this, I find the variable that
>contains the version number, and all the text that is displayed in the
>Help -> About window.
>
>So, after modding the code for Tool-name.dpr, saving the project, and
>closing it, I then opened About.pas, and updated the version number.
>
>When I then ran Tool-name.exe, the version number had not been updated.

Ahh ... this is very simple. Let's see if I understand - because I
suspect some others may not.

You opened the project from windows explorer, did stuff, saved it,
closed it.

You oepend the pas file (not the project) from windows explorer, which
opened only the pas file in delphi, changed it and saved it.

You then ran the executable from windows explorer, and wondered why it
hadn't changed.

Unfortunately, at no point did you compile or build the project. One
very silly thing about delphi is that by Default, you don't know when
the source files are being rebuilt into the executable.

I *strongly* suggest you do three things - since it tends to eliminate
confusion.

1. Only open the .dpr in windows explorer, and use the project manager
window in delphi itself for everything else.
2. Go to Tools > Options > Preferences tab, and check the "Show
compiler progress" tick-box.
3. Once you have that option on, Experiment with the "run" (play
button), "compile" and "build" commands in the project and run menus.
Notice how much work they do wich code that's already been compiled,
versus code that's been freshly modified.

An awful lot happened in the background when you clicked that play
button!

Remember that delphi is a *compiled* language, so the changes only
make it into the exe f you compile it, unlike perl, where the
interpreter re-reads the source files every time.

MH.


Quantcast