Functions and Directives

Function GetPreValidate() Foundation

Tests whether a Get object is permitted to gain input focus.

GetPreValidate( <oGet> ) --> lWhen
<oGet> is the Get object which should receive input focus.

GetPreValidate() returns a logical value which identifies whether a Get object is permitted to receive input focus. If the value is .F. (false), the input field is skipped and no data can be entered.


In some cases, it is required that conditions allowing data input be tested before input begins. Such conditions are set with the command @...GET in the WHEN option, or are defined in the form of a code block which is stored in the instance variable oGet:preBlock .

Before a Get object receives focus, GetPreValidate() is called and the code block in oGet:preBlock is evaluated. The Get object is passed to it and it must return a logical value. The return value of the code block becomes the return value of GetPreValidate(). If no prevalidation rule or code block is defined, the function returns .T. (true).

When GetPreValidate() returns .F. (false), the applicable Get object receives no input focus and no data can be entered. The input field on the screen is skipped.

In the default Get system, the call to GetPreValidate() occurs in GetReader() or GetEventReader().

GetPreValidate() notes
// The function GetPreValidate() should only be used when a 
// user-defined Get reader is implemented. 
// See GetReader() for an example. 


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.