Method Get():new() Foundation

Creates an instance of the Get class.

Syntax
Get():new( [<nRow>], ;
           [<nCol>], ;
           [<bVarBlock>], ;
           [<cVarName>] , ;
           [<cPicture>] , ;
           [<cColor>], ;
           [<bValid>], ;
           [<bWhen>] ) --> oGet
Parameters
<nRow>
<nRow> is a numeric value which indicates the screen row position where the Get object displays and where editing takes place. The default value is 0.
<nCol>
<nCol> is a numeric value which indicates the left most screen column position where the Get object displays and where editing takes place. The default value is 0.
<bVarBlock>
<bVarBlock> is a Get/Set data code block which when evaluated with no argument returns the value of the variable, and when evaluated with an argument assigns the value of that argument to the variable. The default value is NIL.
<cVarName>
<cVarName> is a character string which contains the name of the variable whose value is to be displayed and edited by the Get object. The argument is assigned to the instance variable oGet:name. It is not used by the Get object, but serves as the return value for the function ReadVar(). The default value is a null string ("").
<cPicture>
<cPicture> is a character string which defines the display formatting and editing rules for the value returned by <bVarBlock>. The default value is dependent on the type of data of the variable which is displayed or edited.
Default PICTURE-format for Get-objects
Type of data PICTURE-format
Character Character string filled with "X"
numeric Character string filled with "#"
logical "L"
Date "99 99 99"
<cColor>
<cColor> is a character string which contains two color values. The first color value determines the color for the data when it is displayed but the Get object does not have input focus. The second color determines the color for the edit buffer during editing when the Get object has input focus. If <cColor> contains only one color value, this color is used for both display and editing. If no color values are specified, <cColor> is initialized using the colors returned by SetColor().
<bValid>
<bValid> is a code block which is assigned to the instance variable :postBlock. It is equivalent to the VALID option in the @...GET command and must return a logical value. The code block is evaluated in function GetPostValidate() before a get object looses input focus (see GETSYS.PRG).
<bWhen>
<bWhen> is a code block which is assigned to the instance variable :preBlock. It is equivalent to the WHEN option in the @...GET command and must return a logical value. The code block is evaluated in function GetPostValidate() before a get object receives input focus (see GETSYS.PRG).
Return

The class method :new() returns a Get object. The arguments passed to :new() are assigned to the instance variables :row, :col, :block, :name, :picture and :colorSpec, respectively.

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.