Difference between revisions of "MESSAGELOG"
From ICE Enterprises
ConvertBot (talk | contribs) (Graphical display of all messages from within a macro) |
(No difference)
|
Latest revision as of 18:04, 27 April 2020
Graphical display of all messages from within a macro
<UNUSED>
<UNUSED>
<ROWS> Number of rows in window [DEF=20]
<COLS> Number of columns in window [DEF=132]
MESSAGELOG creates a window in which text messages are displayed. Typically it
is used to display informational, warning, or error messages from a macro. The
message display includes message type, date/time and message text color-coded
by severity: white for informational messages, yellow for warning messages, and
red for error messages.
Which severity levels are displayed is controlled by the on-off toggle buttons
"Error On", "Warning On", and "Info On" located at the bottom of the window.
These settings can be modified interactively by clicking on the buttons to
toggle them on and off. (These buttons do not control the messages being
recorded to a logfile.)
MESSAGELOG must have an /id=n switch, so that it can receive messages.
Macros send messages to MESSAGELOG, as shown in this sample macro:
startmacro
pipe on
messagelog/id=msglog/msgid=main/file=temp
res SEVERITY 2
message send msglog ,, LOG ,SEVERITY, "THIS IS AN ERROR MESSAGE"
res SEVERITY 1
message send msglog ,, LOG ,SEVERITY, "THIS IS A WARNING MESSAGE"
res SEVERITY 0
message send msglog ,, LOG ,SEVERITY, "THIS IS AN INFO MESSAGE"
pipe off
endmacro
Severity levels are: 2=Error, 1=Warning, 0=Informational
The /FILE=filename is an output file in ASCII format which contains all messages
sent to MESSAGELOG. All severity levels are written to this file regardless of
the severity levels being displayed on the window. The /FILE switch is
optional.
MESSAGES:
Receive:
BUTTON - Handle a button press
EXIT - Exit this primitive
LOG - Handle a log message of type INFO, WARN or ERROR
LOGSTATUS - Handle a log status message
REFRESH - Handle a refresh
RESIZE - Handle a resize
SWITCHES:
/BUFFER - force unbuffered I/O on the log [DEF=TRUE]
/ERROR - turn on or off visibility of error messages [DEF=TRUE]
/FILE=filename - name of file to write messages [DEF= no file]
/INFO - turn on or off visibility of info messages [DEF=TRUE]
/THEME=theme - Set the theme of the window
/TITLE=title - Set the title of the window [DEF="NeXt Midas Message Log"]
/WARN - turn on or off visibility of warning messages [DEF=TRUE]
/WIN=regname - name of panel in registry to host the message log window.
If not specified, a new Frame is created.