C5_UPDATED

 UPDATED()
 Determine whether a GET changed during a READ
------------------------------------------------------------------------------
 Syntax

     UPDATED() --> lChange

 Returns

     UPDATED() returns true (.T.) if data in a GET is added or changed;
     otherwise, it returns false (.F.).

 Description

     UPDATED() determines whether characters were successfully entered into a
     GET from the keyboard during the most current READ.  Each time READ
     executes, UPDATED() is set to false (.F.).  Then, any change to a GET
     entered from the keyboard sets UPDATED() to true (.T.) after the user
     successfully exits the GET.  If the user presses Esc before exiting the
     first GET edited, UPDATED() remains false (.F.).  Once UPDATED() is set
     to true (.T.), it retains this value until the next READ is executed.

     Within a SET KEY or VALID procedure, you can change the current GET
     variable using the KEYBOARD command or by assigning a new value with one
     of the many assignment operators.  Changing the variable with KEYBOARD
     is the same as if the user had entered the change directly from the
     keyboard, and UPDATED() is set accordingly.  However, since UPDATED()
     reflects only those changes made from the keyboard, an assignment to the
     GET variable does not affect UPDATED().

 Examples

     .  This example assigns field values from Customer.dbf to
        variables and edits them.  If the user changes any of the values, the
        field variables for the current record are updated with the new
        values:

        USE Customer NEW
        CLEAR
        MEMVAR->Customer = Customer->Customer
        MEMVAR->Address = Customer->Address
        @ 1, 1 SAY "Name:" GET MEMVAR->Customer
        @ 2, 1 SAY "Address:" GET MEMVAR->Address
        READ
        //
        IF UPDATED()
           Customer->Customer := MEMVAR->Customer
           Customer->Address := MEMVAR->Address
        ENDIF

 Files   Library is CLIPPER.LIB.

See Also: @…GET READ SET KEY



Advertisements

2 responses to “C5_UPDATED

  1. Pingback: C5 UI – GET System | Viva Clipper !

  2. Pingback: C5 User Interface | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.