Overview Provides objects for interactive editing of database fields and variables Description A Get object is a general purpose mechanism for editing data. It is used in CA-Clipper to implement the @...GET and READ commands. Get objects provide a sophisticated architecture for formatting and editing data, including cursor navigation and data validation. Data validation is performed via user-supplied code blocks, and display formatting can be controlled using standard picture strings. Normally, a Get object is associated with a particular variable (referred to as the Get variable). The Get object does not directly access this variable; instead, the variable is manipulated by evaluating a supplied code block. When a Get object is created using the standard @...GET command, a code block is automatically created which provides access to the variable named in the command. For a Get object created with the GetNew() function, you must specify an appropriate code block. A Get object evaluates the supplied code block to retrieve the value of the Get variable. The value is converted to displayable form and copied into a buffer referred to as the editing buffer. You can display the editing buffer on the screen for editing. Programmable behaviors allow the navigation of the editing buffer and subsequent copying of its contents back to the Get variable. Examples . This example creates a new Get object, assigns some new attributes to its instance variables, then edits the Get with the READMODAL() function: LOCAL cVar := SPACE(10) // // Create a new Get object objGet := GetNew() // // Assign some instance variables objGet:row := 10 objGet:col := 10 // // Assign the name of the associated // variable and the block objGet:name := "cVar" objGet:block := { |cValue| IF(PCOUNT() > 0,; cVar := cValue, cVar) } // objGet:picture := "@!" objGet:colorSpec := "BG+/B, W+/BG" objGet:postBlock := { |oGet| !EMPTY(oGet:varGet()) } // // Edit the single Get object READMODAL({objGet}) Files: Source file is Getsys.prg. Class Function GetNew() Create a new Get object GetNew([<nRow>], [<nCol>], [<bBlock>], [<cVarName>], [<cPicture>], [<cColorSpec>]) --> objGet Returns a new Get object with the row, col, block, picture, and colorSpec instance variables set from the supplied arguments. More ...
See Also: @…GET READ READMODAL() READVAR() SETCOLOR()
Pingback: C5 UI – GET System | Viva Clipper !
Pingback: C5 Classes | Viva Clipper !