[lazarus] some IDE problems and more

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Dec 16 13:52:45 EST 2002

On Sun, 15 Dec 2002 14:19:22 +0100
Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:

> > 6) For the next it would be easier to download
> > mysql_querier form http://mx.geocities.com/jesusrmx/
> > to see what I mean [the english problem again :(].
> > I was trying to find out why grid.anchors does reduce
> > its bounds to the original created ones (look at
> > Form1CREATE in main form) so I started to find anchors
> > property (ctrl+click: what i nice feature!) that took
> > me to published anchors property in grids.pas,
> > ctrl+click again on anchors  property should take me
> > to ancestor anchors declaration but it won't. A error
> > about it can't find stdctrls on the console appears 
> > TCodeToolManager.HandleException: "unit not found
> > StdCtrls" at line ...., Ctrl+clicking or Ctrl+Enter on
> > grids.pas stdctrls uses declaration wont work, Now the
> > funny thing, if I go to the mainunit.pas editor window
> > and tried ctrl+clicking or ctrl+enter on its stdctrls
> > uses declaration it works!.
> > I've added the path to grids.pas on run->compiler
> > options->Other unit files and other sources.
> > Compiling it's fine but browsing files "external to
> > proyect directory" doesn't work or again is something
> > bad in my setup?.

I guess, you didn't put grid.pas in the same directory as mainunit.pas.
The find declaration in the IDE (CodeTools) and the freepascal compiler are
two completely different systems. The compiler must compile the RTL, FCL,
LCL and your units in 4 different steps. When one unit of the RTL is
modified, everything must be recompiled. The IDE is not limited in this way.
It defines compiler options for each directory. That means all paths and
compiler options of your project are applied to your project directory. And
to _no_ other directory. 
The goal: You want a directory with grid.pas, which needs the LCL paths (say
The solution: Extend the SrcPath for this directory.

- Go to Environment Options -> CodeTools Defines Editor
- Add a new directory: Edit->Insert Node Below->Directory
- Set Value to the directory of grid.pas (/home/jesus/pascal/grid/)
- Add a new define for this directory: Edit->Insert Node as child->Define
- Set 'Variable' to #SrcPath
- Set 'Value As File Paths' to 
- Exit-> Save and exit


More information about the Lazarus mailing list