[Lazarus] installing chm help

Sven Barth pascaldragon at googlemail.com
Thu Feb 16 17:30:32 CET 2012


Am 16.02.2012 17:19, schrieb waldo kitty:
> On 2/16/2012 10:48, Sven Barth wrote:
>> Am 16.02.2012 16:23, schrieb waldo kitty:
>>> 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?
>>
>> The IDE is registering these internally.
>
> i understand that but the question is *when* does it do this...
> remember, i stated that lazarus was running with the chmhelppkg
> installed when i copied the chm files to the docs/html directory... i
> pushed the files in the background across my network from another
> machine to the machine where lazarus was running... what will it do if i
> remove those chm files while it is running?
>
> there is nothing that states that you have to restart lazarus after
> putting the files in place so that these files can be registered...
>

The databases are registered IN CODE inside the IDE. They are always 
registered no matter if a help system is installed. By default they 
simply point to an URL where the online documentation is located. The 
CHM package contains code which overwrites the paths on IDE startup for 
the help and the action to do when an entry is looked for (it 
essentially disables the online help system of Lazarus).

>>> 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
>>>
>>
>> 3. The IDE can not correctly establish the context for Writeln,
>> because it is
>> not physically present in the source (the unit System).
>
> which source? why would the IDE be looking in the system units source
> files? it can't do that on a binary only installed system where there
> are no sources for the system unit...

If I remember correctly you are on a Windows system and you used the 
normal Lazarus installer? Then you have the source, because the Windows 
installer includes the source for the RTL and Packages directories of 
FPC inside %lazarusdir%\fpc\%fpcversion%\ (otherwise most of the RTLs 
features like CodeTools would not work as good as they do, also you 
would not have been able to find e.g. "Integer" in the help).

>>> 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...
>>
>> Lazarus is doing this, because in theory (currently not possible*) you
>> could
>> have the following setup:
>>
>> * for LCL help use the online documentation
>> * for RTL help use LHelp (CHM based)
>> * for FCL help use DocView (INF based)
>>
>> All three help systems are registered to the IDE and for each you have
>> added the
>> corresponding files (e.g. rtl.chm and fcl.inf). Then the IDE will ask
>> each help
>> system whether it can provide help and in our example LHelp will
>> answer with
>> "Yes" for all identifiers that belong to rtl.chm.
>>
>> I know this example is rather artificial, but that is the purpose of
>> this help
>> system.
>>
>> Note: A more practical use case might be to add third party
>> documentation that
>> e.g is only available in CHM format, but for RTL, FCL and LCL
>> documentation you
>> normally use DocView...
>>
>> * This is because of at least two reasons:
>> - the CHM package overrides all databases to itself
>> - DocView does not yet have an integration package
>
> this actually all does make sense... in its context... it does also
> explain why the help system is built the way it is... but it still
> doesn't explain why things that have been documented for years are not
> available in the official chm files... i assume they are available in
> the official html files but have not pulled that huge load down to find
> out... it likely would do me much good anyway because lhelp is all i
> currently have that i can use not to mention the space consumption on an
> already space tight machine :?

I know that I'm repeating myself, but Writeln IS AVAILABLE in the CHM 
files. Just open the help with some other identifier that's available in 
the RTL (e.g. Integer), change to the Search tab and enter "Writeln". In 
the result list (sadly it's a rather long list with a strange sorting) 
you'll find the entry for "Writeln" (in my case it was at the end of the 
list).
It's not the documentation that's flawed here. Both the online 
documentation and the CHM one (and also Graeme's INF one) are created 
from the same raw documentation files (XML files to be specific), so 
there are no content related differences between them. It's just the 
lookup of the IDE's help system that is not able to find 
"System.Writeln", because it does not physically exist as a procedure in 
the System unit.

Regards,
Sven




More information about the Lazarus mailing list