Difference between revisions of "RESTORE GETS"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
=RESTORE GETS=
 
 
 
 
==Class==
 
==Class==
 
Screen Forms
 
Screen Forms
Line 15: Line 12:
  
 
==See Also==
 
==See Also==
[[@...GET]], [[CLEAR GETS]], [[READ]], [[SAVE GETS]], [[READVAR()]]
+
[[@...GET]], [[CLEAR GETS]], [[READ]], [[READVAR()]], [[SAVE GETS]]
  
  
 
==Description==
 
==Description==
The RESTORE GETS command allows reactivation of @…GETS previously saved with the SAVE GETS command.  The optional FROM <memvar> clause can be used to restore GETS from a memory variable.  This allows for multiple SAVE and RESTORE GETS.  Since the Recital/4GL allows @...GET commands to be specified within a validation routine, you can execute a screen form in a procedure invoked by the @...GET...VALIDATE command.  When the validation procedure is terminated, the READ in the calling screen form is reactivated.  This process is called nesting reads.  The RESTORE GETS command also restores the value returned by the READVAR() function.
+
The RESTORE GETS command allows reactivation of @...GETs previously saved with the SAVE GETS command.  The optional FROM <memvar> clause can be used to restore GETS from a memory variable.  This allows for multiple SAVE and RESTORE GETS.  Since the Recital/4GL allows @...GET commands to be specified within a validation routine, you can execute a screen form in a procedure invoked by the @...GET...VALIDATE command.  When the validation procedure is terminated, the READ in the calling screen form is reactivated.  This process is called nesting reads.  The RESTORE GETS command also restores the value returned by the READVAR() function.
  
  
Line 26: Line 23:
 
// Set up validation procedure
 
// Set up validation procedure
 
procedure checkit
 
procedure checkit
parameters check
+
  parameters check
save screen
+
  save screen
// Specify SAVE GETS and CLEAR GETS before @...gets
+
  // Specify SAVE GETS and CLEAR GETS before @...gets
save gets
+
  save gets
clear gets
+
  clear gets
@1,1 get t1
+
  @1,1 get t1
@3,1 get t3
+
  @3,1 get t3
read
+
  read
// Reactivate reads in main screen form
+
  // Reactivate reads in main screen form
restore gets
+
  restore gets
restore screen
+
  restore screen
 
return
 
return
  

Revision as of 15:59, 26 May 2009

Class

Screen Forms


Purpose

Restore saved @…GETS


Syntax

RESTORE GETS [FROM <memvar>]


See Also

@...GET, CLEAR GETS, READ, READVAR(), SAVE GETS


Description

The RESTORE GETS command allows reactivation of @...GETs previously saved with the SAVE GETS command. The optional FROM <memvar> clause can be used to restore GETS from a memory variable. This allows for multiple SAVE and RESTORE GETS. Since the Recital/4GL allows @...GET commands to be specified within a validation routine, you can execute a screen form in a procedure invoked by the @...GET...VALIDATE command. When the validation procedure is terminated, the READ in the calling screen form is reactivated. This process is called nesting reads. The RESTORE GETS command also restores the value returned by the READVAR() function.


Example

// Set up validation procedure
procedure checkit
  parameters check
  save screen
  // Specify SAVE GETS and CLEAR GETS before @...gets
  save gets
  clear gets
  @1,1 get t1
  @3,1 get t3
  read
  // Reactivate reads in main screen form
  restore gets
  restore screen
return
 
@1,1 get field1
@2,1 get field2 when field1="g"
@3,1 get field3 validate with checkit
read


Products

Recital Mirage Server, Recital Terminal Developer