Function GetNew() Foundation

Generates an object of the Get class. This function is deprecated.

Syntax
GetNew( [<nRow>], ;
        [<nCol>], ;
        [<bVarBlock>], ;
        [<cVarName>] , ;
        [<cPicture>] , ;
        [<cColor>]   ) --> oGet
Parameters
<nRow>
<nRow> is a numeric value specifying the row position at which the Get object displays its entry field. The default value is zero.
<nCol>
<nCol> is a numeric value specifying the column position at which the Get object displays its entry field. The default value is zero.
<bVarBlock>
<bVarBlock> is a set/get code block which returns the value of the variable displayed or edited by the Get object or assigns it a value. The default value is NIL.
<cVarName>
<cVarName> is a character string containing the name of the variable whose value is displayed and edited using the Get object. The argument is assigned to the instance variable oGet:name. It is not needed by the Get object itself, but is used as the return value for the function ReadVar(). The default value is a null string ("").
<cPicture>
<cPicture> is a character string with information on the format used during display and editing of the value returned from <bVarBlock>. The default value is "@D" when the return value of <bVarBlock> is data type "Date", otherwise the default value is NIL.
<cColor>
<cColor> is a character string containing two color values. The first color value determines the color for the Get object when it is displayed without input focus. The second color value indicates the color used for display of the edit buffer during editing. The Get object is displayed in this color only while it has input focus. If <cColor> contains only one color, this color is used for display and during editing. When the argument is missing, the system color setting defined with SetColor() is used.
Return

The return value of GetNew() is a new Get object.

Description

GetNew() is a compatibility function, which should no longer be used since Xbase++ makes a complete object model available. Instead of the function call GetNew(), the message :new() should be sent to the class object of the Get class. The same arguments are passed to the method :new() and the function GetNew().

More information can be found under the class Get. For more information on display formatting using <cPicture>, see the description of the command @...GET.

Examples
GetNew()
// The example shows three syntactic approaches to editing 
// a variable using a Get object. 

PROCEDURE Main 
   LOCAL oGet, cString := "Xbase++" 

                                     // command syntax 
   @ 10,20 GET cString PICTURE "!@" COLOR "N/BG,W+/B" 
   READ 

                                     // function syntax 
   oGet := GetNew( 10, 20, ; 
                   {|x|IIf(x==NIL,cString,cString:=x)}, ; 
                   "cString", ; 
                   "@!", "N/BG,W+/B" ) 
   oGet:display() 
   ReadModal( { oGet } ) 


                                     // object oriented 
   oGet := Get():new( 10, 20, ;      // syntax 
                      {|x|IIf(x==NIL,cString,cString:=x)}, ; 
                      "cString", ; 
                      "@!", "N/BG,W+/B" ) 
   oGet:display() 
   ReadModal( { oGet } ) 

RETURN 
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.