Providing online help for developers
You can provide your own online help for your user-defined
functions, user events, and user objects into the PowerBuilder development
environment.
How context-sensitive help
for user-defined functions works
When you select the name of a function or place the cursor
in the function name in the Script view and press Shift + F1:
-
PowerBuilder looks
for the standard prefix (the default is uf_)
in the function name. -
If the standard prefix is found, PowerBuilder looks
for the help topic in the help file containing your user-defined
function help topics (instead of looking in PBUSR125.CHM,
its own main help file). The default file name for help on user-defined
functions is PBUSR125.CHM.PowerBuilder determines the name of the help file to look
in by reading the UserHelpFile variable in PB.INI.
For information on changing the value of this variable, see “Advanced procedures”. -
If PowerBuilder finds the variable, it looks in
the specified help file for the name of the selected function. If
there is no UserHelpFile variable in PB.INI,
PowerBuilder looks for the keyword in the PBUSR125.CHM file in
the PowerBuilder Help directory.
Simplest approach
If you work within the PowerBuilder defaults:
-
Compile all of your
online help for your user-defined functions, user events, and user
objects into a single file named PBUSR125.CHM -
Prefix the name of each user-defined function you
create with uf_ (for example, uf_calculate)
Basic procedures
Here are details on how to build online help into the PowerBuilder environment.
To create context-sensitive help for user-defined
functions:
-
When you create a user-defined function,
give the name of the function a standard prefix. The default prefix
is uf_ (for example, uf_calculate). -
For each user-defined function help topic, assign
a search keyword (a K footnote entry) identical to the function
name.For example, in the help topic for the user-defined function uf_CutBait, create
a keyword footnote uf_CutBait. PowerBuilder
uses the keyword to locate the correct topic to display in the help
window. -
Compile the help file and save it in the PowerBuilder Help directory.
Advanced procedures
You can specify a different file name for context-sensitive
help:
To specify a different
file name for context-sensitive help:
-
Open your PB.INI file
in a text editor. -
In the [PB] section, add a UserHelpFile variable,
specifying the name of the help file that contains your context-sensitive
topics. Your help file must be in the PowerBuilder Help directory.
The format of the variable is:1<span>UserHelpFile </span>= <span>helpfile.chm</span>Specify only the file name. A full path name designation will
not be recognized.
You can change the prefix of your user-defined functions:
To use a different prefix for user-defined functions:
-
Open your PB.INI file
in a text editor. -
In the [PB] section, add a UserHelpPrefix variable,
specifying the value of your prefix. Use this format:1<span>UserHelpPrefix </span>=<span> yourprefix_</span>The prefix must end with an underscore character.