Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- dBsee 4.6 - The Library - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

   The Pre-Edit parameter is used to evaluate the memory variable
   associated to the field (in a data entry, input is always performed on
   memory variables with the same names as the fields) immediately before the
   edit phase (get). In the Pre-Edit option, an expression must be
   entered that evaluates the variable. The value type of the expression must
   match the one of the variable.

   Post-Edit is used to reassign a field, immediately after the edit phase
   (get).

Example:Pre-edit

   In a data entry system, if the Classification field (Class,
   character, 20) is empty, the Not classified value must be assigned. To
   obtain such functionality, the Pre-Edit parameter must be set to:

     
     Pre-edit....: IIF( EMPTY( Class )        ,;
                        "Not classified      ",;
                        Class                 )
     

Example:Post-edit

   In a data entry system, the Class will allow a kind of "quick insert"
   function, in case that the field should contain the Not classified
   value. In other words, when confirming in this field the nc. string,
   the control should display Not classified. To obtain such
   functionality, the Post-Edit parameter must be set to:

     
     Post-edit...: IIF( Class = "nc."         ,;
                        "Not classified      ",;
                        Class                 )
     

   When a Pre-edit or a Post-edit has been defined on a field, the
   source code program will contain a control function. For the second
   example (Post-edit), the control function will be like:

     
     *********************************
     STATIC FUNCTION Class( nPrePost )
     *********************************
     LOCAL aDbL, lRet:=.T.
     * #COD IIGSF10004 * #END
     DO CASE
        CASE nPrePost == FORM_PREGET
             * #COD IIEDTB0004 * #END
             * #COD IIEDTA0004 * #END
     
        CASE nPrePost == FORM_POSTGET .OR.;
             nPrePost == FORM_CHKGET
             * #COD IICHKB0004 * #END
             //  POST-EDIT
             Class := IIF( Class = "nc."         ,;
                           "Not classified      ",;
                           Class                 )
             * #COD IICHKA0004 * #END
     .....
     .....
     RETURN (lRet)

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