The service class MessageHandler has as an objective to have all messages produced by
the tool stored in the language file where they may be easily changed and/or translated into
other languages. This module processes the Xml Messages command that loads the messages into
the language file and then it has a series of simple message issuing methods that all provide
simplified interfaces to the Store_IssueMessage method in Store service class.
The MessageHandler_LoadMessages method loads a set of messages introduced typically
by a Messages xml statement. Each individual message statement has two attributes:
Attribute
Description
id
which supplies a numeric identifier for the message. The message identifiers
must be unique.
text
which supplies the text to be associated with the message.
The parameters of the method are:
Parameter
Description
command
Contains the statement that triggered the call to this method and is used by this
method to receive the individual message specifications.
The MessageHandler_MessageWithTwoStrings method issues a message specified via its
number that has two additional strings associated with it. Its parameters are:
Parameter
Description
number
Specifies the number of the message to be issued.
string1
Contains the first string to be associated with the message.
string2
Contains the second message to be associated with the message.
The MessageHandler_MessageWithString method issues a message specified via its number
that has an additional string associated with it. Its parameters are:
Parameter
Description
number
Specifies the number of the message to be issued.
string1
Contains the string to be associated with the message.
The method MessageHandler_SimpleMessage
Prototype
void MessageHandler_SimpleMessage(int number);
The MessageHandler_SimpleMessage method issues a message specified via its number that
has no additional information associated with it. Its parameter is:
The MessageHandler_MessageWithValue method issues a message specified via its number
that has an additional value associated with it. Its parameters are:
Parameter
Description
number
Specifies the number of the message to be issued.
value1
Specifies the value to be associated with the message.