Re: Lost !
- From: Rob Kennedy <me3@xxxxxxxxxxx>
- Date: Tue, 06 Oct 2009 21:54:51 -0500
Stark wrote:
Movements.pas is a form;
No, it's a file. A source code file for a Delphi unit. Perhaps you define a form class in that file, but the the file is a file, not a form.
this form contains the component FJCalculator which contains FullEditC.
Given the error message, I think FullEditC is another Delphi unit. Components can't contain units.
If what you suppose is true, I have these questions:
- how should I correct the problem ?
Make sure both units are in the same package, and that you have exactly one copy of each .pas file and exactly one copy of each .dcu file on your computer. If you find extras, delete them.
- What I should do to have FJCalculatorForm use a correct version of FullEditC ? Re-compile the package ? (I already did so, but .dcp e .bpl went in the wrong folder (see my previous message)
Then fix your package's configuration. Change the "DCP output folder" and "Output folder" settings in the project options. The DCP output folder should be on your *other* projects' "search path." The folder where your source code is should *not* be in *any* search path. The package that contains those source files should be the *only* project that ever compiles those units.
- Faking a change in the FullEditC.pas component re-creates the .dcu file. But why in the wrong folder ?
Your "Unit output directory" setting is set wrong.
And why the . bpl and .dcp files do not get created ?
You're compiling that unit via another project instead of via the package that owns the unit. To prevent that, make sure your package source code is *not* on any other project's search path, and make sure that no package's unit source files are members of any other projects. Each unit should belong to exactly one project.
- Yesterday night I had the same problem. Compilation went in the wrong folders first, then after a while Delphi took knowledge of the overrides and the application compiled correctly ? You exclude a problem with Delphi 2007 ?
As far as I know, the advice I've given above is valid for all 32-bit Delphi versions.
PS: Another thing I observe compiling the application containing Movements and the rest is that, while the compilation fails, nevertheless I find a new FullEditC.dcu file created (which is abnormal, since this is part of the package containing FJCalculatorForm and should be recreated only if something has changed). Does this suggest you anything ?
Yes. That's *why* you're seeing the errors. You're recompiling Movements, but you're not recompiling FJCalculatorForm. FJCalculatorForm expects to use the previous version of Movements, but you're providing a new version.
--
Rob
.
- Follow-Ups:
- Re: Lost !
- From: Stark
- Re: Lost !
- References:
- Lost !
- From: Stark
- Re: Lost !
- From: Stark
- Lost !
- Prev by Date: Re: Lost !
- Next by Date: Re: Lost !
- Previous by thread: Re: Lost !
- Next by thread: Re: Lost !
- Index(es):
Relevant Pages
|
Loading