SP_GENVAL

GENVAL()

  Short:
  ------
  GENVAL() Generic VALID clause validation with message

  Returns:
  --------
  <lValid> => logical result of passed condition

  Syntax:
  -------
  GENVAL(expValid,expMessage)

  Description:
  ------------
  Evaluates <expValid>, which is either a bode block or
  a string to be macro expanded, as a logical value. If result is
  False, displays message <expMessage> and waits for a keypress.
  <expMessage> can be a single string, or an array of strings (see
  aMsg() ).

  Examples:
  ---------
   if genval("fcount() < 60",'Too many fields')
       COPY TO TEMP
   endif

   * ...or as a VALID CLAUSE macro'd

   @10,10 get lname VALID ;
     GENVAL("!empty(lname)","Need a last name")

   * ...or as a VALID CLAUSE eval'd

   @10,10 get fname VALID ;
     GENVAL( { || !empty(fname) },"Need a last name")

  Source:
  -------
  S_GENVA.PRG

 

SP_GENED

GENED()

  Short:
  ------
  GENED() Generic dbf editing screen

  Returns:
  --------
  Nothing

  Syntax:
  -------
  GENED([lModify],[nTop,nBottom],[aFields,aDesc])

  Description:
  ------------
  Edit ( [lModify] =.f.) current record (DEFAULT) or

  Add  ( [lModify] =.t.) new record.

  Window top [nTop] and bottom [nBottom] default to
  centered.

  Use optional [aFields] (field names) and [aDesc]
  (field descriptions), or use all fields in dbf.

  Examples:
  ---------
   use Customer index Customer

   Gened(.f.,2,20)   // edit

  Notes:
  -------
  Allows memo editing (multiple memo fields)
  New to 3.5: memo editing is done to a memvar. Changes aren't
  saved unless the whole record is saved. A global [F3=Memo] key
  lets you pick which memo to edit.

  Source:
  -------
  S_GENED.PRG