Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2014-09

The mysterious case of the double TOC

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Reinier Olislagers

Did some digging related to Lazarus bug
http://bugs.freepascal.org/view.php?id=26681
F1 (context sensitive help) gives chooser with duplicate entries

Marco suggested a possible cause for the error:
"there is only one article but two entries in the CHM index/toc"

Had a look at a TOC from a lazdoc-generated LCL.CHM and yes: <param name="Name" value="Classes and Objects, by Unit">, line 11 then value="TForm" on line 1336
<param name="Name" value="Alphabetical Classes and Objects List">, line 3825 then value="TForm" on line 52547

AFAIU, lcl.chm is generated by build_lcl_docs
build_lcl_docs calls fpcdoc; last time I checked it, you need to call it something like (added line endings)
cd /d C:\development\lazarus\docs\chm
C:\development\lazarus\docs\html\build_lcl_docs.exe "--fpcdocs"
"C:\development\lazarus\docs\chm\"
"--fpdoc"
"C:\development\fpctrunk\bin\i386-win32\fpdoc.exe" "--css-file=C:\development\fpctrunk\utils\fpdoc\fpdoc.css" "--outfmt" "chm"
which calls fpdoc with [1] - note the --auto-toc option

1. Is this fpdoc invocation correct?
2. Should something be changed in the LCL xml files?
3. Should fpdoc be fixed to not generate duplicate names?

Thanks,
Reinier

[1]
inputfile.txt contains a huge list of source files, e.g. ..\..\..\lcl\actnlist.pas -Fi..\..\..\lcl\include
..\..\..\lcl\alllclunits.pp -Fi..\..\..\lcl\include ..\..\..\lcl\arrow.pp -Fi..\..\..\lcl\include
...

C:\development\fpctrunk\bin\i386-win32\fpdoc.exe --content=lcl.xct --package=lcl --descr=..\..\xml\lcl\lcl.xml
--import=C:\development\lazarus\docs\chm\rtl.xct,ms-its:rtl.chm::/ --import=C:\development\lazarus\docs\chm\fcl.xct,ms-its:fcl.chm::/ --output=lcl.chm --auto-toc --auto-index --make-searchable --css-file=C:\development\fpctrunk\utils\fpdoc\fpdoc.css --format=chm --descr=..\..\xml\lcl\actnlist.xml --descr=..\..\xml\lcl\alllclunits.xml --descr=..\..\xml\lcl\arrow.xml --descr=..\..\xml\lcl\asyncprocess.xml --descr=..\..\xml\lcl\buttonpanel.xml --descr=..\..\xml\lcl\buttons.xml --descr=..\..\xml\lcl\calendar.xml --descr=..\..\xml\lcl\checklst.xml --descr=..\..\xml\lcl\clipbrd.xml --descr=..\..\xml\lcl\colorbox.xml --descr=..\..\xml\lcl\comctrls.xml --descr=..\..\xml\lcl\controls.xml --descr=..\..\xml\lcl\customdrawn_android.xml
--descr=..\..\xml\lcl\customdrawn_common.xml
--descr=..\..\xml\lcl\customdrawn_winxp.xml
--descr=..\..\xml\lcl\customdrawncontrols.xml
--descr=..\..\xml\lcl\customdrawndrawers.xml
--descr=..\..\xml\lcl\customtimer.xml --descr=..\..\xml\lcl\dbactns.xml --descr=..\..\xml\lcl\dbctrls.xml --descr=..\..\xml\lcl\dbgrids.xml --descr=..\..\xml\lcl\defaulttranslator.xml
--descr=..\..\xml\lcl\dialogs.xml --descr=..\..\xml\lcl\dynamicarray.xml --descr=..\..\xml\lcl\dynhasharray.xml
--descr=..\..\xml\lcl\dynqueue.xml --descr=..\..\xml\lcl\editbtn.xml --descr=..\..\xml\lcl\extctrls.xml --descr=..\..\xml\lcl\extdlgs.xml --descr=..\..\xml\lcl\extendedstrings.xml
--descr=..\..\xml\lcl\extgraphics.xml --descr=..\..\xml\lcl\filectrl.xml --descr=..\..\xml\lcl\forms.xml --descr=..\..\xml\lcl\fpcadds.xml --descr=..\..\xml\lcl\graphics.xml --descr=..\..\xml\lcl\graphmath.xml --descr=..\..\xml\lcl\graphtype.xml --descr=..\..\xml\lcl\graphutil.xml --descr=..\..\xml\lcl\grids.xml --descr=..\..\xml\lcl\helpintfs.xml --descr=..\..\xml\lcl\icnstypes.xml
--descr=..\..\xml\lcl\imagelistcache.xml
--descr=..\..\xml\lcl\imglist.xml
--descr=..\..\xml\lcl\industrialbase.xml
--descr=..\..\xml\lcl\inipropstorage.xml
--descr=..\..\xml\lcl\interfacebase.xml
--descr=..\..\xml\lcl\interfaces\gtk\gtkdef.xml
--descr=..\..\xml\lcl\interfaces\gtk\gtkfontcache.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkglobals.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkint.xml
--descr=..\..\xml\lcl\interfaces\gtk\gtkmsgqueue.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkproc.xml
--descr=..\..\xml\lcl\interfaces\gtk\gtkwinapiwindow.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwsbuttons.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwscalendar.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwschecklst.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwscomctrls.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwscontrols.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwsdialogs.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwsextctrls.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwsextdlgs.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwsforms.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwsgrids.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwsimglist.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwsmenus.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwspairsplitter.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwsspin.xml --descr=..\..\xml\lcl\interfaces\gtk\gtkwsstdctrls.xml --descr=..\..\xml\lcl\interfaces\gtk\interfaces.xml --descr=..\..\xml\lcl\interfaces\win32\win32int.xml --descr=..\..\xml\lcl\intfgraphics.xml
--descr=..\..\xml\lcl\lazcanvas.xml
--descr=..\..\xml\lcl\lazdeviceapis.xml
--descr=..\..\xml\lcl\lazdialogs.xml
--descr=..\..\xml\lcl\lazfreetypeintfdrawer.xml
--descr=..\..\xml\lcl\lazhelphtml.xml
--descr=..\..\xml\lcl\lazhelpintf.xml
--descr=..\..\xml\lcl\lazlinkedlist.xml
--descr=..\..\xml\lcl\lazregions.xml
--descr=..\..\xml\lcl\lclclasses.xml --descr=..\..\xml\lcl\lclintf.xml --descr=..\..\xml\lcl\lclmemmanager.xml
--descr=..\..\xml\lcl\lclmessageglue.xml
--descr=..\..\xml\lcl\lclproc.xml --descr=..\..\xml\lcl\lclrescache.xml --descr=..\..\xml\lcl\lclstrconsts.xml --descr=..\..\xml\lcl\lcltype.xml --descr=..\..\xml\lcl\lclunicodedata.xml
--descr=..\..\xml\lcl\lclversion.xml --descr=..\..\xml\lcl\ldocktree.xml --descr=..\..\xml\lcl\lmessages.xml --descr=..\..\xml\lcl\lresources.xml --descr=..\..\xml\lcl\maps.xml --descr=..\..\xml\lcl\maskedit.xml --descr=..\..\xml\lcl\menus.xml --descr=..\..\xml\lcl\pairsplitter.xml --descr=..\..\xml\lcl\popupnotifier.xml
--descr=..\..\xml\lcl\postscriptcanvas.xml
--descr=..\..\xml\lcl\postscriptprinter.xml
--descr=..\..\xml\lcl\postscriptunicode.xml
--descr=..\..\xml\lcl\printers.xml
--descr=..\..\xml\lcl\propertystorage.xml
--descr=..\..\xml\lcl\registerlcl.xml
--descr=..\..\xml\lcl\rubberband.xml
--descr=..\..\xml\lcl\shellctrls.xml --descr=..\..\xml\lcl\spin.xml --descr=..\..\xml\lcl\stdactns.xml --descr=..\..\xml\lcl\stdctrls.xml --descr=..\..\xml\lcl\stringhashlist.xml
--descr=..\..\xml\lcl\textstrings.xml --descr=..\..\xml\lcl\themes.xml --descr=..\..\xml\lcl\tmschema.xml --descr=..\..\xml\lcl\toolwin.xml --descr=..\..\xml\lcl\translations.xml --descr=..\..\xml\lcl\utrace.xml --descr=..\..\xml\lcl\valedit.xml --descr=..\..\xml\lcl\xmlpropstorage.xml

Reply by email

Michael Thompson
to Reinier Olislagers
Had a look at a TOC from a lazdoc-generated LCL.CHM and yes: <param name="Name" value="Classes and Objects, by Unit">, line 11 then value="TForm" on line 1336 <param name="Name" value="Alphabetical Classes and Objects List">, line

3825

then value="TForm" on line 52547

Nicely found. I potentially see benefit from the multiple entries in the TOC as show above (presuming those categories are available elsewhere in the viewer). Perhaps all that's required is adding that Category as a new column in the ListView?

Mike

Reply by email

Reinier Olislagers
to Michael Thompson
Michael Thompson wrote
Nicely found. I potentially see benefit from the multiple entries in the TOC as show above (presuming those categories are available elsewhere in the viewer). Perhaps all that's required is adding that Category as a new column in the ListView?

Well, the entries both point to the same article so having to choose after pressing F1 makes no sense.... even if you show categories? (See the bug tracker issue where the Help selector pops up duplicate entries)

The categories are already shown in the contents in the treeview (IIRC) at the left of lhelp.

Reply by email

Marco van de Voort
to Reinier Olislagers: Did some digging related to Lazarus bug http://bugs.freepascal.org/view.php?id=26681 F1…

In our previous episode, Reinier Olislagers said:

Show quoted text 12 lines
Did some digging related to Lazarus bug http://bugs.freepascal.org/view.php?id=26681 F1 (context sensitive help) gives chooser with duplicate entries Marco suggested a possible cause for the error: "there is only one article but two entries in the CHM index/toc" Had a look at a TOC from a lazdoc-generated LCL.CHM and yes: <param name="Name" value="Classes and Objects, by Unit">, line 11 then value="TForm" on line 1336 <param name="Name" value="Alphabetical Classes and Objects List">, line 3825 then value="TForm" on line 52547

Double entry in the TOC seems logical. TOC is like a home page for the html, not meant as searchable index. The bugreport I mentioned it because the TOC might be processed and added to Index or fulltextsearch, thus poluting it.

According to

http://forum.lazarus.freepascal.org/index.php/topic,25913.msg158242/topicseen.html#new

lhelp utilizes fulltextsearch. Still I don't get two entries there either using MS' viewer.

But I think primarily basic search should use the index. (that is what the textmode IDE does for context sensitive search). I never worked on fulltextsearch, I hardly know how it works.

Reply by email

Reinier Olislagers
to Marco van de Voort
Marco van de Voort wrote
Double entry in the TOC seems logical. TOC is like a home page for the html, not meant as searchable index. The bugreport I mentioned it because the TOC might be processed and added to Index or fulltextsearch, thus poluting it.

Ah, now I get you.

http://forum.lazarus.freepascal.org/index.php/topic,25913.msg158242/topicseen.html#new lhelp utilizes fulltextsearch. Still I don't get two entries there either using MS' viewer.

No, not always. That thread talks about using fulltextsearch when clicking the Search button in lhelp, not when invoking context-sensitive help (F1) in the IDE...

But I think primarily basic search should use the index. (that is what the textmode IDE does for context sensitive search). I never worked on fulltextsearch, I hardly know how it works.

Ok, good point.... I'll have a !

Reply by email