A.1 What GATE Does
definition to each project file. If the window title needs to be localized, you can put the
title in Gate.txt.
Text strings that need localization are collected in Gate.txt. The file contains project
titles, window titles, the language setting for each compiled file and text that is
automatically inserted in topic files. For topics that have an object code in the heading
(tables, reports, batch jobs, and so on), GATE automatically builds a new heading and
title, based on entries in Gate.txt. Depending on the topic type, GATE inserts a link to
fields in a table/report/batch job or a link from a field to the table/report/batch job.
GATE requires that you have an object file in the Application folder. When you run
GATE, GATE searches for object codes in the topic files and replaces the codes with
values from the object file. The name of the file must be Object.txt. For projects that
use the Base folder, the path is as follows:
For add-on projects that do not use the Base folder, the path is as follows:
The file format is unchanged from earlier versions of Microsoft Dynamics NAV.
Specifically, Object.txt is an unformatted ANSI text file where each line contains an
object code and the corresponding object text. The format is as follows:
If you do not have an object file, or do not need one, you can simply create an empty
text file named Object.txt in the Application folder. It is necessary to create this folder,
as GATE cannot run without it.
How GATE Replaces Object Codes
The first time you run GATE, it creates an MS Access database named ~Object.mdb in
the Shared folder. GATE then reads Object.txt and stores the object codes and texts in
the database. GATE also stores the file size and date of Object.txt in the system registry.
When GATE needs the text for a given object code, it gets the text from the database,
not the object file.
When you subsequently run GATE, GATE compares the file size and date of your object
file with the values stored in the registry. If they are different, the object database is
deleted and a new database created.
When replacing object codes, GATE searches for the following patterns:
($ [object code] $)
($ [object code] [object text] $)
The object code must begin with a left bracket, a dollar sign and at least one space.
There must be at least one space following the object code. There can be zero or more
spaces following the object text. The object code must close with a dollar sign and a
When GATE replaces object codes, it uses a sequence. First, GATE gets the object code
from the string and looks in the object database for the corresponding object text. If
GATE finds an object text, it replaces the string with the text. Otherwise GATE looks for
an object text in the string and replaces the string with this text. If GATE doesn’t find an
object text, it replaces the string with the object code. When getting the object code
and text, GATE checks the string for errors. If it finds any errors, the string is left
Project file (.hhp)
GATE uses the project file to get information about the Help project. The file is copied
to the Processed folder and then modified based on information in the files
ProjectSettings.txt and Gate.txt. Changes to the different sections are explained below.
For consistency across projects, GATE sets a number of settings in the [OPTIONS]
section based on information in the ProjectSettings.txt file. Another reason for
automatically applying settings is that RoboHelp and Microsoft’s HTML Help Workshop
interpret some settings differently. For example, RoboHelp explicitly writes Binary
Index=Yes when you choose to use a binary index. If you then open the project file
using HTML Help Workshop, this line is removed, because it is the default setting.
Reopening the project with RoboHelp then sets binary index to "No", because
RoboHelp interprets the missing line as a no.
The following settings are set automatically:
Compatibility=1.1 or later
Error log file=Error.log
Display compile progress=No
Display compile notes=No
GATE sets the name of the compiled file to the name of the project. Additionally, GATE
looks for a project title in Gate.txt. If no title is found, the setting is left unchanged.
Finally, GATE gets the language setting from Gate.txt and GATE does not change the
default file setting.
GATE takes all window definitions from the ProjectSetttings.txt file and copies them to
the [WINDOWS] section. Existing definitions with the same name are replaced. GATE
looks for a window title in Gate.txt and inserts the title in the window definition (the
window title appears on the window bar when the compiled file is opened). GATE also
gets the filenames of the contents and index files from the current project and inserts
them in the window definition. This lets you open individual (slave) projects for review
under development without having to use the master project.
A.1 What GATE Does
You can also create your own window definitions for specific purposes; GATE leaves
Other Sections in the Project File
The following sections explain how the other sections of the project file are used.
GATE reads the [FILES] section and copies all listed files to the Processed folder. If GATE
cannot find a file in the Source folder, GATE writes an error message to the report log.
You must list all files in your project here, including graphics files, for example. If you
fail to list a file, GATE cannot copy the file to the Processed folder, and you will get an
error message when compiling.
[ALIAS] and [MAP] Sections
GATE copies all files listed in these sections to the Processed folder. GATE uses the alias
file (.ali) when creating the .hh file. The map file (.h) is copied to avoid a missing file
error when compiling.
The master project, Master.chm, lists all compiled files that are part of the modular help
system, including add-on projects. GATE does not change this section in any way. Slave
projects do not have this section.
Table of Contents File (.hhc)
GATE searches for and replaces any object codes in the table of contents file. GATE also
searches for the <OBJECT...> statement that contains the parameters Window Styles
and ExWindowStyles and replaces the parameters with values from ProjectSettings.txt.
These parameters govern the behavior of the table of contents.
Index file (.hhk)
GATE searches for and replaces any object codes in the index file.
Topic files (.htm)
Most of the files in a help project are topic (.htm) files. GATE copies topic files to the
Processed folder based on the [FILES] section of the project file. GATE then in turn
opens each topic file and makes a number of changes, as described below.
The Topic Heading
The topic heading (the first line of text in the <BODY> section) is central to how GATE
processes a topic file. If GATE finds and recognizes an object code in the heading, the
topic is treated as an object topic; otherwise it is treated as a non-object topic. For object
topics, Microsoft Dynamics NAV guidelines specify that the topic filename be the same
as the object code.
Recognizing the Heading
GATE expects the heading to be formatted with the Heading 1 tag, and searches for
the string <H1>*</H1>. Text between the opening and closing tags is regarded as the
heading text. Note that if the <H1> tag contains any formatting, it will not be
recognized. GATE will write to the report log and not make any changes to the topic.
GATE searches the heading text for an object code. If GATE finds an object code, the
topic is treated as an object topic; otherwise it is treated as a non-object topic. Any text
before an object code will cause GATE to treat the topic as a non-object topic. Any text
after an object code is ignored (deleted). Note that object topics will not be recognized
correctly if the heading text contains any formatting.
Building a new heading
For object topics, GATE builds a new heading based on information in Gate.txt. GATE
checks also for an object text in the object database. For a table, this could be "The
[object text] Table." For non-object topics, the heading is left unchanged.
The Head Section
GATE makes a number of changes to the head section, as described below.
The Topic Title
GATE always replaces the title text. For object topics, GATE builds the title based on
information from Gate.txt. For a table, this could be "[object text] (table)." For non-
object topics, the title is simply replaced with the topic heading.
The Character Set Statement
GATE searches for a character set statement in the head section, and replaces the
statement based on a value from the form. By default, RoboHelp 2000 doesn’t insert
the statement, so for most topics the statement will simply be added. For Western
Europe, where the correct character set is Windows-1252, GATE inserts the following
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-
The Stylesheet Statement
GATE searches for a stylesheet statement in the head section, and replaces or inserts
<LINK REL="StyleSheet" HREF="master.css">
GATE automatically adds index keywords for a number of object topics. Keywords are
added for tables, reports, batch jobs and dataports, as well as for object topics where
the object code begins with S, DA, P, A and U. GATE automatically adds tables, reports
and batch jobs, and so on, to the keywords. Keywords are not added for fields in tables,
reports and batch jobs. GATE adds the following to the head section:
<META NAME="MS-HKWD" CONTENT="[object text]">
A.1 What GATE Does
Index Stop List
You can prevent GATE from automatically adding an index keyword to a topic by
adding the object code to the index stop list file. GATE compares the current object
code to codes in the stop list file before adding a keyword. The index stop list file must
be named IndexStopList.txt, must be in the Source folder and must be added to the
[FILES] section of the project file. IndexStopList.txt must be an unformatted ANSI text
file, with one object code per line, as shown below:
The above line prevents GATE from adding the keyword Customer to the customer
GATE adds an alink target to the head section of all object topics. The alink target, or
name, is the same as the object code. Adding an alink target lets you link to a topic
without knowing the exact location of the topic. Additionally, the link will still work if a
topic is moved from one project to another. This feature is primarily intended for add-
on projects where Help authors don’t have up-to-date information on topic locations.
GATE adds the following line to the customer topic:
<META NAME="MS-HAID" CONTENT="T_18">
For fields in tables, GATE inserts an additional alink target made up of the object code
for the table plus "_FIELDS". This is used for the "List of all Fields" hyperlink on table
topics. For a field in the Customer table, GATE inserts the following:
<META NAME="MS-HAID" CONTENT="T_18_FIELDS">
Other Changes to the Head Section
To tidy up the head section, GATE removes a number of unnecessary statements. GATE
removes the reference to RoboHelp’s script file (BSSCDHTM.js), all "generator"
statements, plus any comments (RoboHelp’s comments in the head section have been
known to cause problems).
When you create a new topic file with RoboHelp, or edit an existing topic, RoboHelp
places a number of function calls in the opening <BODY> tag. (The functions are
located in the BSSCDHTM.js script file.) Other HTML editors can modify the tag by for
example adding background and foreground colors. For consistency, and because we
are not planning to use the RoboHelp script file, GATE selects the body tag and
replaces it with <BODY>.
GATE searches for object codes and replaces them with the object text.
Automatically Inserted Hyperlinks
In tables, GATE inserts the "List of all Fields" hyperlink. The hyperlink text is taken from
Gate.txt. The hyperlink itself uses an alink search to get a list of fields, which means that
the list is dynamically updated, and that fields can be placed anywhere in the Help
system. The alink search text is [object code]_FIELDS.
The hyperlink is as shown below:
The hyperlink refers to the object shown below:
<PARAM NAME="Command" VALUE="ALink">
<PARAM NAME="Item1" VALUE="">
<PARAM NAME="Item2" VALUE="[object code]_FIELDS">
GATE also inserts hyperlinks for fields to their respective tables, reports and batch jobs.
The hyperlink text is taken from Gate.txt. These hyperlinks use alinks and use the same
structure as shown above.
The .hh File
When you run GATE, it creates an .hh file in the Processed folder containing a list of all
object topics in the project. Additionally, GATE reads the alias (.ali) file and adds an
entry for each line in the file. C/SIDE uses .hh files to check if Help is available for
objects in the application.
The .hh file is built up as an XML file. The sample text below contains an entry for the
The Source attribute contains information about where the entry originated. Possible
values are the project file or the alias file. When checking for available topics, C/SIDE
reads the ID element. The master and slave elements are used in modular help systems,
such as the Base application Help. When calling the Help, C/SIDE constructs a string
using the master, slave, topic and window elements. For stand-alone Help projects,
such as the C/SIDE Help, the .hh file doesn’t contain the slave element. The topic
element is the filename in the compiled Help containing Help. For object topics, the ID
and topic elements are the same. For aliased topics, the ID and topic elements are
different. The Priority tag is intended for add-on Help projects and old WinHelp
projects. By giving a topic a high priority, you instruct C/SIDE to call your add-on Help
rather than a topic in the base Help. Finally, the window element tells C/SIDE which
window definition to use.
A.1 What GATE Does
Stylesheet files (.css)
GATE first looks in the Shared folder for the master stylesheet Master.css. If GATE finds
the stylesheet, it is copied to the Processed folder. Then, GATE looks for any stylesheets
in the Source folder. If GATE finds the master stylesheet, it checks if the file has already
been copied to the Processed folder. If not, it is copied to the Processed folder. All
other stylesheets in the Source folder are copied to the Processed folder.
GATE saves each user’s settings to the system registry. Settings are per user, so different
users sharing a common PC can each save their own settings. When you run GATE,
your settings are restored. When you close GATE with the Cancel button, GATE checks
if your settings are changed, and prompts you to save the new settings.
Compiling the Help
GATE prepares your HTML Help project for compilation. To compile the Help, you need
Microsoft’s HTML Help Workshop, available from Microsoft’s Internet site. When you
have installed the Help Workshop, you can instruct GATE to call the compiler
automatically by checking the Compile box on the form.
A.2 How C/SIDE Looks Things up in Help Projects
Help has not been written for all objects, controls and table fields in Microsoft
Dynamics NAV because many of them display the same information. For example, the
Chart of Accounts window displays information from the G/L Account table, so Help
has not been written for the window. Instead, the Help for the G/L Account table is
C/SIDE searches for Help for the various object types in a specific order. The order
depends at first on how the Help is activated (using the Help button or F1/the Help
cursor). If Help is activated using F1 or the Help cursor, the order is also determined by
where the cursor is when the Help is accessed.
The Table and Report object types can be seen on the screen only by using a form, and
fields can be seen only by using controls. Therefore, according to C/SIDE, Help is always
accessed from a form or a control.
The order that C/SIDE follows when Help is retrieved from the C/SIDE and Application
Help projects is outlined in the following. First we will describe the order used when
Help is activated on ordinary forms, that is, all forms except for Request Forms and
Flow, Field and Table Filter Subforms. Then we will describe the slightly different order
used for Request Forms and Flow, Field and Table Filter Subforms.
Both descriptions are illustrated with drawings that show the order for both the Help
button and the F1 key or Help cursor. The Help button is of course a control, but
C/SIDE uses a special order because the Help here must always display a general Help
never a control or field Help.
You should note two things when you read the descriptions:
1 The description distinguishes between an Application Form and a System Form. All
Application Forms belong to the application, while System Forms belong to the
C/SIDE development environment.
2 For all four drawings, the search for Help for T_TableID and T_TableID_FieldID is
omitted if the relevant form or control is not associated with a table.
Documents you may be interested
Documents you may be interested