[Lazarus] Help on FCL?

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Jan 28 08:02:01 CET 2012


On Fri, 27 Jan 2012 21:43:59 +0100
Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:

> Mattias Gaertner schrieb:
> 
> >> Look at the Options > FPDoc Editor page, where the user has to add the 
> >> search paths, and tell us what a user has to enter there.
> > 
> > Normally: nothing.
> > If you like: you can add the path to the fpcdocs.
> 
> I already had to add several paths, to e.g. the widgetset(s) and 
> IdeIntf. Is this a missing fpdoc directory in the packages, or what else 
> requires to add these directories manually?

The package IDEIntf has its own fpdoc path. It is 'docs', which is
relative to the ideintf.lpk, so the fpdoc files are
in /path/to/lazarus/ideintf/docs.
It works here. I can see and edit help for formeditingintf.pas
ComponentPaletteImageWidth.

Analog for the LCL which contains the widgetsets.

 
> Or the other way round: what makes the FPDoc Editor look into the right 
> directory, when no explicit path is given?

The search works as following:
First it searches for the declaration of the identifier.
Then it searches for the owner of the unit (e.g. a package)
If the package has a fpdoc path, an unitname.xml is searched.
Finally if the global fpdoc path is set, an unitname.xml is searched
there.
The hint and fpdoc editor searches for the ancestors of the
identifier too.

Hint: Update to 34980 and you can now see which fpdoc file is used in
the source editor / popup menu / open file. If there is no xml file,
then no fpdoc file was found.

ToDo: implement something to use the docs of a newer Lazarus Version
and newer package versions, where the units may have different owners
and paths. Maybe a file with a list of some information like: 
for the ideintf.lpk version 1.0.0 to 1.0.2, use fpdoc search path xyz,
and a list of unit aliases.
The IDE should be able to load several of these files, so that third
party packages can use that feature too.


Mattias




More information about the Lazarus mailing list