[Lazarus] installing chm help

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Feb 16 18:37:29 CET 2012


On Thu, 16 Feb 2012 10:23:55 -0500
waldo kitty <wkitty42 at windstream.net> wrote:

> On 2/16/2012 06:49, Mattias Gaertner wrote:
> > On Thu, 16 Feb 2012 12:30:44 +0100
> > Michael Schnell<mschnell at lumino.de>  wrote:
> >
> >> On 02/15/2012 06:38 PM, Andrew Haines wrote:
> >>> When you press F1 in lazarus it performs it's own search of what it is
> >>> looking for. If it finds something it presents a list of possible
> >>> results if there are more than one.
> >> Where does Lazarus (I suppose you mean the IDE ) search ?
> >
> > It asks the registered help databases. See View / IDE internals /
> > About IDE / help.
> 
> "registered help databases"?? /when/ do they get registered?

You only need to know, if you want to write a help db like chmhelppkg.
It's done in the "register" procedure of an installed package unit.

 
> the reason i ask is because one thing i expressly did _not_ do when i followed 
> the instructions and started this thread was to exit lazarus at all...

IDE plugins can register and unregister Help databases at any time.
The plugins needs to be installed and for this you need to restart
the IDE once.


> lazarus 
> was up and running the whole time i was following the instructions... the only 
> time it was not was when it restarted after i add the chmhelppkg and 
> recompiled... 

ok

> lazarus was running when i copied the chm files into the docs/html 
> directory... lazarus was running when i fixed the incorrect FPDoc Editor's path 
> to the doc files...
> 
> > The help databases do the real search and how they do that is
> > completely up to them.
> 
> another interesting tidbit...
> 
> >> If it finds anything does it call the Help viewer via the Help Package
> >> interface (i.e. can the help viewer add some info) or does it organize
> >> the output on its own ?
> >
> > If no db found anything, then the IDE shows an error message.
> 
> i've seen that! :)
> 
> > If multiple db found something, then the IDE shows a dialog to choose.
> 
> i've seen this, too! ;)

Maybe chmhelppkg reported several results.
That's a choice of the chmhelppkg. Maybe it can be made optional and
use it's own selector in the viewer.

 
> > If only one db found something, then the IDE calls the help viewer of
> > the mime type.
> 
> and finally i've seen this, as well :)
> 
> so it is lazarus that is performing these digs into the chm files and isn't 
> locating these items that should already be documented in these local 
> documentation files (eg: write and writeln)... i guess now one needs to figure 
> out why... it could be one of two things, as far as i can see...
> 
>    1. the information simply is not in the chm (not good)
> 
>    2. there is a coding or logic error leading to the miss
> 
> TBH, i'm still reading back over your words and am still rather surprised that 
> lazarus is doing this work instead of the help viewer... i would have thought 
> that it would have been the help viewer doing the work after lazarus told the 
> help viewer what to search for... this also explains why i cannot "back up" to 
> choose another db entry but have to exit the help viewer and perform the F1 hit 
> again...

The IDE has no idea of chm files. All chm functions and how chm is
searched or presented to the user is done by the chmhelppkg and lhelp. I
have not written this package. Maybe next week I have some time to look
at it and improve a few things.


Mattias




More information about the Lazarus mailing list