Table of Contents

New "Soft" Functionality

Published ByDateVersionKnowledge LevelKeywords
Sprezzatura Ltd01 AUG 19912.03+EXPERTPOP_UP_SOFT, CHANGE_TYPE, SOFT

As AREV moves more and more towards a completely soft environment, tools need to be added to address flexibility issues. In addition the approach taken by developers needs to be as flexible as possible - especially with the potential of the European marketplace. Revelation Technologies have committed to producing AREV in several European languages and consequently have been introducing routines to support this. One such is POP_UP_SOFT.

POP_UP_SOFT

Anyone who has ever struggled with reading in popup records just to amend one attribute before calling POP.UP will welcome this routine. POP_UP_SOFT is a preprocessor for the standard POP.UP function. It allows specific attributes of a popup to be changed on the fly without amending the actual popup record. The routine accepts 14 parameters and is declared as a function and used in exactly the same way as POP.UP.

The first parameter is the FILE_NAME*POPUP_NAME, the second is a flag variable and the remaining twelve parameters are the normal popup parameters. Note that it is only necessary to assign those variables which are to be used, the remaining parameters may safely be omitted. E.G.

       declare function pop_up_soft
       X = WC_SI%<10> + WC_WLX%
       Y = WC_SI%<11> + WC_WLY%
       POP = "POPUPS*MEMBER"
       FLAG = 0
       @ANS = pop_up_soft(POP,FLAG,X, Y)

In the above example, the popup would appear at the position of the prompt response on screen. The use of the appropriate window common variables ensures that the popup will still appear in the correct place if the user has moved the window using Ctrl-F8.

Note that the file may be omitted - in this case POPUPS will be assumed. As with the original POP.UP routine if the record is not found in POPUPS, SYS.POPUPS is checked.

FLAG is used to indicate whether an error message ought to be displayed by POP_UP_SOFT and to indicate the success of the operation. The flag values thus far identified are

Passed FlagBehaviour
0no error messages displayed
1error messages displayed
Returned ValueDescription
0operation successful
1record not found.
2file not found

CHANGE_TYPE

CHANGE_TYPE is a subroutine which makes it easier for the developer to modify the type of prompts (Required, Optional etc) on the fly. It takes two parameters, the first being a field mark delimited list of prompt numbers to change and the second being the type required. Thus to set the first three prompts in a window to Required,

       declare subroutine change_type
       PROMPT_LIST = 1 : @VM : 2 : @VM : 3
       change_type(PROMPT_LIST, "R")

(Volume 3, Issue 4, Pages 4,5)