Loading...
 

CX_SYSTEM_OBJECT::RegisterAttentionNotification

CX_SYSTEM_OBJECT::RegisterAttentionNotification

Description:
Registration:

This function can be used to register a message which is triggered when Attention is called instead of the dialogue window. Thus messages can be intercepted at runtime which would otherwise interrupt the program flow. To restore the standard behaviour (i.e. to log off the message again), the function is simply called again and NULL is passed.

Release:

When the message is triggered, the text of the attention message (as a string) is transferred on the stack.

(from Dll version: 184147): The level of the Attention Notification is additionally put as notification level on the stack. To ensure backwards compatibility, this value is lower than the message. If no level parameter is given to Attention, there is always WARN.

Before processing the attention message, the sent message is deregistered, i.e. if another attention occurs during processing of the attention message, it is normally displayed as a hint in a hint dialog. After processing, the registered message is valid again. In this way unwanted (endless) loops are avoided. If further attention calls are to be intercepted in InstantView during processing, RegisterAttentionNotification can be called again at the beginning (or at any other time in the treatment routine).

Code example:

...
Msg(ATTENTION_MESSAGE)
...
(ATTENTION_MESSAGE) SystemObject Call(RegisterAttentionNotification)
...
ATTENTION_MESSAGE: // Hier kann auf Attention reagiert werden

signatures:
Registration:
Stack
Stack Position Object type Brief description
Stack(In) Top CX_SYSTEM_OBJECT the SystemObject
Top 1 INTEGER Message constant
Stack(Out) Top -
Release:
Stack
Stack Position Object type Brief description
Stack(Out) Top STRING Text of the Attention message
Top 1 Notification level Level of attention (INFO, WARN, ERROR)
Function call: Call(RegisterAttentionNotification)