On Fri, 09 Dec 2005 12:19:35 +0200
Graeme Geldenhuys <[EMAIL PROTECTED]> wrote:

> Mattias Gaertner wrote:
> > Belong these units to the project or a package?
> > If not, please add them. Otherwise the IDE does not know, that they are
> > relevant.
> 
> I'm not sure I can do that, except if Lazarus works quite different to 
> Delphi when it comes to Projects.

It is quite different.

 
> Let me try to explain (as it worked under Delphi). Take the persistence 
> layers of my OPF as an example.  If I include the unit of a persistence 
> layer into my Delphi project, the initialization section of that unit 
> registers that persistence layer with the OPF Framework.  I can only 
> have one default persistence layer.  The same thing applies for my OID 
> generator.  The Object ID's generator generates different types (int, 
> string, GUID, etc...), depending on which unit I included in the Delphi 
> project (via tiDependencies.pas).  My different units don't appear in 
> the Delphi Project Manager treeview, but it does know which ones to 
> include when compiling.
> 
> I thought Lazarus would work in the same way, so kept my project in that 
> style.  If I had to add all my different OID generator units to the .lpr 
> file, wouldn't all those unit's initialization sections get executed at 
> compile time.  I can only register one OID generater at a time.  It is 
> easier to specify Conditional Defines at compile time, than adding and 
> removing files from the project.

Delphi stores the unit information in the .dpr file. The 'in' specifier
defines in Delphi what unit belongs to the project and where they are.
Lazarus stores this information in the .lpi file. The .lpr file is only the
start source for the compiler. It does not define, what units belongs to the
project, nor where they are. This is a common misunderstanding for
Delphians. 

You can add units to the lazarus project and remove them from the .lpr file.
Or IFDEF them. They are still part of the project (.lpi).
Normally when you add a unit to the project, the IDE will add it to the .lpr
file once. As with every automatism, this may be unwanted. Just edit the
.lpr file. It is a normal source file.

 
> >>I use Ctrl+F9 a lot.  The only way to do a build now, is by using the 
> >>Build All menu option.  Is there a place I can disable this new 
> >>.compiled function and get Lazarus back to what it was?
> > 
> > 
> > I added one to the project options.
> 
> When was that added, and what is it called? 

An hour ago. 
Project -> Project Options -> Misc -> Always Build (even if nothing changed)


> In the mean time, I setup a 
> new keyboard shortcut (Ctrl+Shift+F9) to execute the Build All function.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to