|
|||||||
New "Soft" FunctionalityAs 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_SOFTAnyone 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. 0001 declare function pop_up_soft 0002 X = WC_SI%<10> + WC_WLX% 0003 Y = WC_SI%<11> + WC_WLY% 0004 POP = "POPUPS*MEMBER" 0005 FLAG = 0 0006 @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 0 no error messages displayed 1 error messages displayed Returned 0 operation successful 1 record not found. 2 file not found CHANGE_TYPECHANGE_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, 0001 declare subroutine change_type 0002 PROMPT_LIST = 1 : @VM : 2 : @VM : 3 0003 change_type(PROMPT_LIST, "R") (Volume 3, Issue 4, Pages 4,5) |
|||||||
| |||||||