Silent Mode |
Top Previous Next |
You may need that your program don't ever show a message box. For example, in a "Service" like program, or when running an unattended program that you don't want to interrupt for any circumstance. Simply setting the global variable to TRUE, all the messages() from that moment on, won't show at all. Stop() will be ignored, and Halt() will be executed as usual but without a message if any is specified. The audit (When using with FullRecord) won't be recorded for these messages, as there is no action that the user can see or act against. If you need to audit a movement for a particular message even in Silent Mode, you need to add a manual call to the FullRecord procedure SaveAuditMessage(). If you embed your own code into the NeatMessage() procedure, it won't be executed.
You may specify that no message will be shown, or that only the next (n) messages won't be shown. This is specially useful when you need to deactivate a message not under your control (for example, a message that you knows it comes next, but it is under control of another 3rd party or a class).
Next-only Silent mode example:
NMGLO:SilentModeNextOnly = TRUE Message('Skip this one') Message('Answered Yes')
If NeatMessage is active, the first Message will be skipped.
NMGLO:SilentModeNextOnly = 2 Message('Skip this one') Message('Skip this one too') Message('Answered Yes')
If NeatMessage is active, the first two Messages will be skipped.
NMGLO:SilentModeNextOnly = TRUE MyClass.Run NMGLO:SilentModeNextOnly = FALSE
If NeatMessage is active, the first Message inside MyClass will be skipped. Just in case no messages are displayed, you set the variable back to FALSE to resume normal behaviour.
Silent mode example:
NMGLO:SilentMode = TRUE Message('Skip this one') Message('Answered Yes')
If NeatMessage is active, both Messages will be skipped, and any other following these until NMGLO:SilentMode is set to FALSE. |