Member variable Get():preBlock Foundation

Contains an optional code block that determines whether editing is allowed.

Attribute: EXPORTED
Data type: Code block | NIL
Description

A code block may optionally be assigned to the instance variable :preBlock. By default, the value of this instance variable is NIL and is not required by the Get object. During processing of the READ command by ReadModal(), if the :preBlock instance variable of the currently active Get object contains a code block it is evaluated by the function GetPreValidate() prior to the Get object gaining input focus. The code block in :preBlock should contain an expression or call a function that accepts one argument (the Get object) and return .T. (true) if the Get object should receive focus, or .F. (false) if it should not. If the code block returns .T., focus is set on the current Get object, otherwise processing continues with the next Get object. When using the @...GET command, the expression specified in the WHEN clause is stored in a code block which is then automatically assigned to the instance variable :preBlock.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.