Computer Programming Solutions
TECHNICAL INFORMATION SHEET

Installing the IBO Help into the Delphi 5 Help System

from Ruud Luiten <mhcur@attglobal.net>

Abstract:  In trying to install the IBO help into the Delphi 5 IDE, I kept searching and experimenting and it took me almost a day to sort it out before I got it to work. Borland's Openhelp.hlp does not help anyone out since the information it gives you is less than basic. 

This is not a problem specific to IBO.  I also added help files for DevExpress and the combination made
things worse.  I have the feeling Openhelp surely screws it up, although the number of help files might be a problem as well. I'm writing it up to help others on their way since I am sure I am not the only one having these problems.  Although every detail might not be 100% correct, users should be able to work through their problems with this information.

OpenHelp Tabs

The openhelp tabs change the following files:

contents 	delphi5.ohc             includes all .toc files*
index		delphi5.ohi             for the indexes (refers to .hlp files)
link		delphi5.ohl             for the links   (links to .hlp files)
project		delphi5.ohc             refers to the .cnt file

Be aware that it is the .ohc file that is reflected in the contents tab in openhelp, while it is the .cnt file that is reflected in the Contents tab in the Delphi help file.   Accordingly, in OpenHelp the Contents do not show the same thing as the Delphi help screen gives. 

Check the delphi5.cnt files if you have strange behaviour with the delphi contents tab. Be aware that includes are nested and that, if files are screwed up by OpenHelp, it is usually caused by included files. Check them with a text editor and an open mind and you'll figure it out.

OpenHelp seems to work when you use only the index and the link tabs.

Problems I Encountered

The problems I came across seemed to have been caused by using the openhelp application's Project tab.  For example, adding ibo.cnt file changed some files that it shouldn't have changed, not related to the IBO help file.  I don't know what happened (and didn't follow up because, in the end, it was working) but looking at the ascii files and the changes made in .ohi .ohl or .cnt files (not sure which one(s) any more) I figured out the interaction between these files, openhelp and the help system.

Editing the Files

Editing the .oh* files with a normal text editor instead of trying to set them up through the OpenHelp application tools seems to work better, with fewer problems.  If you want to forget about using the OpenHelp tools, you can get it to work by editing the .ohi .ohl .and .cnt files. 

I solved my problems by editing the .oh* files directly, to includ the .cnt file. It takes some experimenting to understand to whole structure, but once you get the hang of it it is actually quite easy.

Add the following lines to these files to get the IBO help system to work:

.ohi file
:INDEX InterBase Objects=IBO.HLP

.ohl file
:LINK IBO.HLP

.cnt file
:include ibo.cnt

Make sure there's a registry entry that points to the ibo.hlp  file

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help

IBO.HLP should point to the right directory
_________________________________________________________________

Addendum 1 from Kyle Cordes <kyle@kylecordes.com>

It is possible to add the IBO help to the Open Help system using the IDE tool.  The tool was somewhat counterintuitive. I would have expected it to say "Add This Help File" and it would add it to everything.  But I found that I needed to add it to each relevant tab of the Open Help system. Specifically, 
you must add it to the "Link" tab for F1-style context-sensitive help to work, to another tab to have it in the table of contents, and to yet another to be in the "index".
_________________________________________________________________

Addendum 2 from Christian Gütter <cguetter@pgpa.de>

If you've done exactly what Ruud and Kyle have suggested and context-sensitive help still doesn't work properly - it doesn't show the correct IBO-related topics when pressing F1 to get help on an IBO component (an error that has troubled me in Delphi 4, 5 and 6), try this solution - it worked for me in Delphi 6.

- Exit Delphi and OpenHelp 
- Delete all *.gid files in the Delphi\Help directory (they will be recreated by Delphi automatically) 
- Start Delphi and then the Delphi help to rebuild these files
_________________________________________________________________

Thanks, Ruud, Kyle and Christian.

If you have any tips to add to this topic, please send a message to the list!

Jason Wharton
Computer Programming Solutions
CPS - Mesa - AZ
http://www.ibobjects.com