Embedding Topic information in code

HTML Help Builder also allows for a special import mechanism that works with a documentation block that's kept directly with the source code of each method definition. A Help comment block might look like this:

#IF .F.
TEXT
********************************
*   HELP BUILDER COMMENT BLOCK *
********************************
*:Help Documentation
*:Topic:
wwHelp::CreateProject

*:Parameters:
<b>lcFileName</b>
Name of the file to create. Should include a full path preferrably 
in a 'clean' directory as all work files are created in this directory.

<b>lcTitle</b>
<i>Optional</i> Title of the project.

*:Returns:
.T. or .F. 

*:Remarks:

*:Example
oHelp.CreateProject("c:\temp\HelpProject\HelpProject.hbp")

*:EndHelp
#ENDIF

The block can be added at the end of a VCX code method. Because of the #IF .F. flag the code is not compiled into your final executable. The code block must contain the starting header of

*:Help Documentation

and block ending tag

*:EndHelp

All other entries in between are optional and correspond directly to the fields in the Topic file. Each of the *:FieldName values displayed above correspond directly to a < %= TopicLink("field name in the help topic table","Topic data field layout") % >. This list is dynamic and works even with user defined fields that you add to your own help topic files if needed. The text entered here is identical to what you would enter directly using the Help Builder User Interface. This makes this mechanism fully user extensible.


© West Wind Techologies, 1996-2023 • Updated: 12/14/15
Comment or report problem with topic