pCDLMessage

Output an application message.

Syntax

pCDLMessage ( in vlAction,
              in vlOperation,
              in vlMessCode,
              in vlMessType,
              in vlMessage,
              in vlTitle,
              in vlImagePath)  

Parameters

vlAction

The current action.

vlOperation

The current operation.

vlMessCode

The message number for the message to be displayed.

vlMessType

The message type ('E' and 'S' for error, 'W' for warning, 'I' for information, and 'Q' for questions).

vlMessage

The message text.  Used to override the default message for the operation.

vlTitle

The title. Used to override the default title for the operation.

vlImagePath

The file path to an image.

Comments

pCDLMessage is similar to pUserMessage but it does not have buttons and it display the message until it is closed by the application. It is typically used to display status information that does not require user interaction.

Available actions:

Display

Open the message window (if necessary) and display the message.

Open

Open the message window.

<pause time>

Open the message window (if necessary) and display the message for this number of seconds and then close.

Close

Close the message window.

 

The message text can contain any of the following formatting commands:

/b

Causes the bell to be sounded.

/c

Centers the message text in the window.

/r

Breaks the message text into two lines.

/w

Causes the message text to wrap in a two line field.

 

The Framework provides the ability to define messages in many different languages. Language for a message is defined by the ApplMessLang field in ApplMessages and the ApplMessTitleLang field in ApplMessTitles. For example, the entries supplied with DC have these fields set to "E" to indicate they are in English. You can add additional entries in other languages and use any language code you like.

When pCDLMessage is called, the global variable $Language is assumed to be set to be the language code you wish to use. If $Language is $NULL, it is set to "E".

The messages window captions is found in ApplMessTitles by looking for ApplMessOperation equal to vlOperation and ApplMessLang equal to $Language. If no entry is found, a default caption is used.

The actual message is looked up in ApplMessages using vlMessCode and $Language. The message text can contain parameter indicators in the form &!, &2, &ldots;, &10. These indicators are replaced with the current values of the associated parameters set by calls to pUserMsgParm.

The message type is taken from vlMessType if vlMessType is not blank. Otherwise, the type is taken from the ApplMessages record.

The message text is taken from vlMessage if vlMessage is not blank. Otherwise, the message text is taken from the ApplMessages record.

Uses

ApplMessages, ApplMessTitles.

pCDLMessage has a sleep time option. Passing the value "-seconds" for the vlAction parameter forces pCDLMessage to 'sleep' the specified time without closing the message box afterwards.

Example

This command displays a message box, waits for five seconds and then returns control to the calling object.

$DeployServices.pCDLMessage('-5','','','', 'This is a message...', 'Window Caption', '')