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.)
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:
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:
- Use either decimal or hexadecimal numbers formatted in standard C notation to specify context IDs.
- Assign no more than one context ID to a topic ID or alias. Assigning the same context ID to more than one topic ID will generate a compiler error.
- You can use the C
#include
directive to include other files that map the context-sensitive help topics. In addition, the [MAP] section supports an extended format that lets you include C files with an H extension directly.- As in other project file sections, use the semicolon (;) to begin each line of comment text in the [MAP] section. Entries using the C
#define
directive may contain comments in C format, as in the following example:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |