On Thu, 6 Apr 2006 03:20:10 -0300
"Flávio Etrusco" <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> I'm having a hard time trying to get a grasp of CodeTools Defines
> (Editor) and I can't find any documentation about it on the web or in
> Lazarus sources. Is there anyone?

No. See below.

 
> If not, I'll start with a concrete case: all codetools fail (with
> error 'Unit not found', pointing to LCL units) on files not explicitly
> included in the project, but instead accessed by means of "Other Unit
> Files" configuration in 'Compiler options...' dialog of 'Project' main
> menu.

I guess, you mean something like this:
/path/project/unit1.pas
/path/dir/unit2.pas

- project's unit path points to unit2
- unit2 is not part of the project or any package
- unit2 uses the LCL

=> The IDE will not find the LCL units for unit2


> I debugged the IDE and "discovered" that the LCL units aren't found
> because the 'FindDeclarationTool' restricts the search to the folder
> of the active document because it can't find a '#SrcPath' variable
> defined (it is, for files added to the project or from LCL or fpc).
> 
> So, how can I fix this exact situation? And better yet, can anyone
> share some insight on the CodeTools Defines so I/we can make a better
> use of it? ;-)

Fix:
Add unit2 to a package and define, what it needs.

Reason:
Every package and project define their own set of values/search paths. For
example the FPC sources are world of their own and do not use the LCL.
Every directory can contain 'defines'. A 'define' is for example the
definition of the SrcPath. The 'defines' are defined by the 'templates',
seen in the codetools defines editor. When you browse through the tree, you
can see, that most of the values are created from the compiler or the
compiler options of the packages and project. And some, like the FPC and
Lazarus sources are hand made.
You can add your own definitions, like adding the defintions for a Delphi7
Source directory. There is a template for that in the menu.

I had not yet the time to write documentation for this editor. It's needed
only for projects with platform specific settings.


Mattias

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

Reply via email to