Paged Messages
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Revelation Technologies | 22 FEB 1989 | 1.1X | INTERMEDIATE | MESSAGE, MAP, MSG, MULTI-PAGED |
In version 1.1 of Advanced Revelation, an addition was made to the roster of message types already available. This message type produces a paged message useful for presenting multi-page text in a message format.
A paged message offers these features:
- the message presents a page of information at a time
- if there is more than one page of text, the word More appears in the lower right border, along with an arrow indicating where additional information is to be found*the up and down cursor keys and [PgUp] and [PgDn] keys page forward and backward in the message
- [Esc] and [Return] both exit the message
The paged message type is used extensively within Advanced Revelation for novice-level help messages (such as the opening message), and for help messages within EasyWriter.
Creating and Calling a Paged Message
Most message types can be created using the undocumented message window (available from TCL by entering CW MESSAGE). However, due to its use of system delimiters, the paged message is best created and edited directly in the editor.
Message record
Most typically, a message will be stored in the MESSAGES file. Messages in the MESSAGES file can be called using the MSG subroutine. For example, to call a message stored in the MESSAGES file, the following syntax can be used:
CALL MSG(message,'','','')
In this call, message is an expression that evaluates to the message record key.
Message map
Alternately, a message map can be created dynamically in an R/BASIC program and passed as the second argument of the MSG call. The MSG calling syntax in this case is:
CALL MSG('',map,'','')
The argument map contains a dynamic array of all parameters required for the message. The map layout is identical in a dynamic call to that of the MESSAGES record itself.
Paged Message Record Layout
The layout of the message record and map for a paged message is as follows:
Field # | Description |
---|---|
1 | type. This should be set to M. |
2 | buffered. If passed as B, the message will be buffered in memory after being displayed. |
3 | column |
4 | row |
5 | attribute. The video attribute is passed as with a other message types, or can be passed as the name of a system video variable (@PW, @AW, @XW, etc.) |
6 | justification. If passed as T, the message will wrap lines to fit within the width and depth specified in attribute 7. L and R justification truncate lines to fit into the specified width. |
7 | width & depth. These are passed as two integer values delimited with a text mark (@TM, ASCII 251). |
8 | border title. Border is a value from 1 to 5 that determines the combination of lines around the message. Title is the literal text that appear in the top border when the message displays. The two parameters are separated with a text mark. |
9 | (unused) |
10 | (unused) |
11 | script. A value mark or subvalue mark within the text will force a line break, regardless of the justification. |