Re: Lost !



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
.



Relevant Pages

  • Re: Lost !
    ... User Overrides for BDSCOMMONDIR and BDSUSERDIR ... and .dcp went into my folders, while the .dcu went into the folder of the package source. ... A source code file for a Delphi unit. ...
    (comp.lang.pascal.delphi.misc)
  • Delphi Package design flawed ?
    ... Delphi adds the folder of the installed Package to the library path. ...
    (alt.comp.lang.borland-delphi)
  • Re: FastMM and Delphi 2006
    ... > 1) Should I only copy the BorlndMM.dll from the latest version of FastMM ... > package to Window\System32 folder so to make the Delphi 2006 work with the ... The borlndmm.dll is inside the \bin folder of your Delphi installation. ...
    (borland.public.delphi.language.basm)
  • packages
    ... I want to package all my classes in the folder ... i have a teller class, Account class, Customer Class, ... In the manual it says insert package phase 1; as the first line of the ... source code, But It is not working, can anybody please help me on this ...
    (comp.lang.java.help)
  • Re: GExperts 1.30 + code formatter
    ... > I can compile the package with Delphi 2006 and do some testing with it. ... > Can you send me the source code to get it compiled? ...
    (borland.public.delphi.thirdpartytools.general)

Loading