Progress
Help Development
Guide


Mapping Context-sensitive Help Topics

Context-sensitive help relies on the [MAP] section, where the help author pairs a context ID with a topic ID for a specific topic. A context ID is a unique number that the help author or application programmer assigns to each application context in the Progress application that requires online help. An application context is any currently displayed window, dialog box, frame, button, field-any user interface element-that has input focus.

When the user requests context-sensitive help from a running application, the help calling interface passes the context ID to the help engine which then displays the topic associated with the topic ID.

Figure 4–2 shows the simplest way to pair a help topic’s topic ID with its assigned context ID in the [MAP] section.

Figure 4–2: [MAP] Section Example

The Help button in the Procedure Editor Buffer List dialog box is coded to request the topic whose context ID is 49156. When a user clicks the Help button, the help engine immediately displays the help topic whose Topic ID is Buffer_List_Dialog_Box, based on the [MAP] section entry shown inFigure 4–2.

In addition to the method shown in Figure 4–2, you can use one of the following methods to specify context-sensitive help topics in the [MAP] section of the help project file:

Method 1—Use the C language #define directive to assign context IDs to topic IDs which are also defined in a C include file. (In the example below, the context ID is in hexadecimal form. The special characters /* and accompanying text are C language comments.)

[MAP]
#define Main_Index 0x000                    /* Contents topic */
#define Menu_Commands 0x001                 /* Menu Commands topic */
#define Procedure_Editor_Window 0x002       /* Main Editor window */
#define Buffer_List_Dialog_Box 0x003        /* Buffer List dialog */
#define Compiler_Message_Dialog_Box 0x004   /* Compiler Message dialog */
#define Buffer_Settings_Dialog_Box 0x005    /* Buffer Settings dialog */
#define System_Options_Dialog_Box 0x006     /* System Options dialog */
#define Save_Buffers_Dialog_Box 0x007       /* Save Buffers dialog */ 

NOTE: If context IDs use the #define directive, and the file that contains the #define statements is included in both the application code and the help file, then updates made to the context IDs are automatically reflected in the next help build.

Method 2—Use the C language #include directive to tell the help compiler to link a separate header file that contains the context-sensitive mapping information. The filename of the included file must be enclosed in double quotes (" ") or angle brackets (< >).

This example is from the [MAP] section of the Procedure Editor help project file:

[MAP]
#include <EDITENG.HH> 

The format of the header file should be either that shown in Method 1 or Method 2.

Be careful to follow these conventions when creating the [MAP] section:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095