Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>get</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Get
 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.

See Also: @...GET READ READMODAL() READVAR() SETCOLOR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson