skip navigation

Context-sensitive Help with compiled Help systems - Part 1

By Carol Johnston.

Contact us if you would like a PDF version of this article.

What is context-sensitive Help?

Context-sensitive Help is assistance that is appropriate to where the user is in the software application, and what they are trying to do.

Who is involved in creating it?

Context-sensitive Help requires that the Help author and the programmer join forces.

  • The programmer creates a means of calling the Help from each dialog of the application. This could be via a Help button or a right-click menu option.
  • The Help author creates appropriate topics within the Help file.

It is strongly recommended that both parties meet up early on in the project to double-check that both are clear on the process and role responsibilities.

Who does what?

To implement context-sensitive Help we need to map Help-related objects on the application interface to appropriate Help topics. This mapping is achieved by way of a header file.

There are two ways for the Help author and the programmer to work together to achieve context-sensitive Help:

  1. The programmer creates a header file and sends it to the Help author. (This is the more common situation.)
  2. The Help author creates a header file and sends it to the programmer.

So what exactly is a header file?

Each object on the application interface has a unique number associated with it (the context number). This number is what will be used by the application to find the correct Help topic.

However, it is much easier for humans to deal with descriptive names, rather than numbers. For example, the context name CTX_SALES_DIALOG is much easier to understand and recognise than the context number 2384. However, the application and the compiled HTML Help ultimately require a number.

The header file is simply a list of all the context names and their corresponding context numbers. It is a simple text file whose layout depends on the programming language being used to create the application.

Language

File extension

Syntax

Example

C

.H

#define string number

#define CTX_SALES_DIALOG 1000

Pascal

.PAS

string = number;

CTX_SALES_DIALOG = 1000;

Basic

 

.BAS

string = number

or

GLOBAL CONST string = number 

CTX_SALES_DIALOG = 1000

 

GLOBAL CONST CTX_SALES_DIALOG = 1000

The header file is not used at runtime. The information it contains is included in the Help system on compilation.

When the programmer creates the header file...

… the programmer must:

  1. Produce a list of the context names and numbers for all dialogs and fields that require context-sensitive Help– the header file.
  2. Send the header file to the author.

… the author must then:

  1. Import it into the Help project.
  2. Set up the context names in the header file to be aliases for the corresponding topic names.
    This literally means giving the topics alternative names.

When the Help author creates the header file...

… the author must:

  1. Create context name aliases and context numbers for all dialog level context-sensitive topics.
  2. Create context numbers for all field level context-sensitive topics.
  3. Produce a list of the context names and numbers – the header file.
  4. Send the header file to the programmer.

…the programmer must then:

  1. Import it into the application.
  2. Associate all the context names in the header file with the corresponding Help-related objects in the application.

Next: Writing the content