Using the Image Editor Programming Tools Using the Resource Selection Browser
 

Using the Help Tool

Index


Introduction

The ST/X Help Tool allows you to build and maintain help-text dictionaries for graphical user interfaces.
You can define and/or modify the key <-> text associations, which specify the helptext to be displayed when the user moves the mouse pointer over a widget.

By default, the helpText dictionary is stored in the method helpSpec in the class protocol of the application.
Common help texts should be moved to a superclass of the application class to avoid having the texts around multiple times and to make changes easier.

Notice:
The texts as defined in the helpSpec are used as keys for national language translated variants, which are loaded from the application's resource file.


Starting the Help Tool

Normally, the Help Tool is embedded as a sub canvas in a GUI Painter or Menu Editor.
However, it may also be used stand alone. There are 2 ways to start the Help Tool:
  1. by double-clicking in a System Browser on a resource method An icon representing a help resource method containing a help specification
  2. by evaluating one of

  3.     UIHelpTool open
        UIHelpTool openOnClass:anApplicationClass
 

Description of a Help Specification

The specification of a help resource is simply an array of pairs, each consisting of a help key and a help text. The help resource method has following format:

helpSpec

    <resource: #help>

    ^super helpSpec addPairsFrom:

#(

#helpKey1
'This is the help text for the help key 1.'

#helpKey2
'This is the help text for the help key 2.'

...

)

The resource methods of the help specifications have to be implemented as class methods in subclasses of the class ApplicationModel. Other classes with window or menu resource methods should implement the #helpSpecClass-method, to specify the class which provides the help information.
The returned class should be a subclass of ApplicationModel:

For example:

helpSpecClass

   ^ApplicationModelSubclassWithTheHelpSpec
 
 


The Functions of the Help Tool

Help Key List List of the help text keys.
Add Button Adds a key.
Remove Button Removes the help text key from the widget.  
Only available, if the Help Tool is embedded in a GUI Painter or Menu Editor.
Delete Button Deletes the help text from the help spec.
Help Key Entry Field Unique help text key. 
Help Spec Classes List List of the classes where help specs can be/are implemented.
Help Text Text Editor Shows the help text. 
Help text which can be displayed in the application by redefining the help call showHelp: aHelpText for: aView, where aHelpText is the help text and aView is the widget instance invoked the call. Usually, this text is displayed in the application's help or info label; but its also possible to pop up an active help bubble. 



Copyright © 1998 eXept Software AG, all rights reserved