SP_POPUPDIR

POPUPDIR()

  Short:
  ------
  POPUPDIR() Popup of a given directory for file selection

  Returns:
  --------
  <cFileName> => name of the file selected

  Syntax:
  -------
  POPUPDIR([cSpec,cAttrib,cTitle,cColor,lAllowView])

  Description:
  ------------
  Displays a popup of the directory specified, for
  selection of a file.

  The name of the file selected is returned. You may
  indicate optional file viewing.

  [cSpec] specifies the drive, directory and file
  specification

  Wildcards are allowed. Default is "*.*", current
  drive, current dir.

  [cAttrib] is a string containing file attribute
  symbols for inclusion of special file types. The symbols are:

     H                     Include hidden files
     S                     Include system files
     D                     Include directories
     V                     Search for the DOS volume label and exclude
                           all other files

  [cTitle] a string to be displayed on the top of the
  popup box. Default is

  "Directory Viewer"

  [cColor] color of the box. Default is sls_normcol()

  [lAllowView]  if True, allows Alt-V to view the
  currently highlited file. A DBF is browsed, a text file is viewed with
  FILEREAD().

  Default is False.

  Examples:
  ---------
   cFileName := POPUPDIR("c:\windows\*.INI",nil,nil,nil,.t.)

  Source:
  -------
  S_POPDIR.PRG

 

 

SP_POPREAD

()

  Short:
  ------
  POPREAD() Pops up a box with 1-5 say-get combinations

  Returns:
  --------
  nothing

  Syntax:
  -------
  POPREAD(lStacked,[nTop,nLeft,cColor],cSay,@expGet,cPicture...)

  Description:
  ------------
  [lStacked]   .t. = GETS are displayed below SAYS,
               .f. = GETS are displayed beside SAYS (default)

  [next 3 params may be option params - see below]

  For 1-5 iterations of  [cSay,@expGet,cPicture]  a
  popup window will display a Say <cSay>, do a Get on the variable
  passed by reference in <@expGet> with a Picture of <cPicture>. A
  read will then be issued.

  If params 2,3 and 4 are passed as Numeric/Numeric/Chr
  then they are evaluated as the top,left and color for the popup
  box.

  [nTop] = top
  [nLeft] = left
  [cColor] = color string

  Examples:
  ---------
   dDate := date()
   cTime := space(8)
   lFun  := .t.

   POPREAD(.t.,"Current Date",@dDATE,"@D",;
       "Current Time",@cTIME,"99:99:99",;
       "Having Fun ?",@lFUN,"Y")

  Notes:
  -------
  This is an intelligent version of ONE_READ. 2nd param
  is passed by reference rather than by name - cutting down
  DRASTICALLY on the macro expansion and greatly simplifying the
  code. To pass by reference, preface the parameter with @.

  Source:
  -------
  S_POPR.PRG

 

 

SP_POPMONTH

POPMONTH()

  Short:
  ------
  POPMONTH() Popup month selection

  Returns:
  --------
  <nMonth> => number of the month selected

  Syntax:
  -------
  POPMONTH([nStart])

  Description:
  ------------
  Popup a picklist of months January -
  December.[nStart] is a month 1 - 12

  Examples:
  ---------
   nMonth := POPMONTH()

  Source:
  -------
  S_DPOPS.PRG

 

SP_POPEX

POPEX()

  Short:
  ------
  POPEX() Pops up an achoice for a certain filespec

  Returns:
  --------
  <cFileName> => file name or "" for none

  Syntax:
  -------
  POPEX(cSkel,[cTitle])

  Description:
  ------------
  Pops up a picklist for all files matching the
  skeleton given as <cSkel>. i.e. "*.dbf"

  If a path is passed, the path is returned as part of
  the filename.

  Optional title string [cTitle] - displays at top of
  box

  Examples:
  ---------
   cOpendbf := POPEX("*.DBF")
       // => will return DBF name

   opendbf = POPEX("C:\FILES\*.DBF")
       // => will return "C:\FILES\" plus DBF name

  Source:
  -------
  S_POPEX.PRG

 

 

SP_POPCOLSEL

POPCOLSEL()

  Short:
  ------
  POPCOLSEL() Popup color grid for selecting a single color

  Returns:
  --------
  <cColor> => selected color

  Syntax:
  -------
  POPCOLSEL([cStartCol])

  Description:
  ------------
  Pops up a grid for selecting a single color (W/N,
  +R/W, etc).

  If SETBLINK() is set to .f., high intensity
  background colors are available, otherwise not.

  [cStartCol] is an optional starting color, which
  defaults to setcolor().

  If ESCAPE is pressed, the starting color is returned.

  Examples:
  ---------
   setblink(.f.)
   initsup()
   cNewColor := popcolsel()

  Source:
  -------
  S_PCSEL.PRG

 

 

SP_PMREADER

PMREADER()

  Short:
  ------
  PMREADER() Creates specialized PLUS/MINUS get reader block

  Returns:
  --------
  <bReader> => get reader block for GET

  Syntax:
  -------
  PMREADER()

  Description:
  ------------
  Creates a get reader block that allows
  increment/decrement of date of numeric values with the plus or minus key.

  Implement by using the SEND keyword for your
  @Say..Get.. statements.

    i.e. @10,10 say blah get blahblah SEND reader:=PMREADER()

  Examples:
  ---------
   // while in the get V1, you will be able to use the +-  keys to
   // increase/decrease the value of V1

   v1 := 100
   @10,10 get v1 SEND reader := pmreader()
   READ

  Source:
  -------
  S_READRS.PRG

 

 

SP_PLSWAIT

PLSWAIT()

  Short:
  ------
  PLSWAIT() Pops up a 'Please Wait' window or removes it

  Returns:
  --------
  Nothing

  Syntax:
  -------
  PLSWAIT(lOnOff,[cMessage],[nTop,nLeft,nBottom,nRight])

  Description:
  ------------
  Pops up a window with a 'please wait' message or
  removes a previous 'please wait' window.

  <lOnOff> True means show popup window, False means
  remove window.

  [cMessage] - message. Default is 'Please wait...'

  [nTop,nLeft,nBottom,nRight] box coordinates. Defaults
  are 10,20,12,60.

  Examples:
  ---------
   PLSWAIT(.T.,"I'm thinking...")

   // code here

   PLSWAIT(.F.)   // remove plswait message

  Source:
  -------
  S_PLSW.PRG

 

 

SP_PICKREADER

PICKREADER()

  Short:
  ------
  PICKREADER() Creates specialized picklist reader block

  Returns:
  --------
  <bReader> => get reader block for GET

  Syntax:
  -------
  PICKREADER(aValues,[nTop,nLeft],[nBottom,nRight])

  Description:
  ------------
  Creates a get reader block that is a popup list from
  the array <aValues>.

  Implement by using the SEND keyword for your
  @Say..Get.. statements.

    i.e. @10,10 say blah get blahblah SEND reader:=PICKREADER(aValues)

  <aValues> is an array of values that are of the same
  type and length as the GET.

  [nTop,nLeft] optional top, left coordinates

  [nBottom,nRight] optional bottom/right coordinates

  Examples:
  ---------
   // while in the get V1, you will be presented with a picklist
   // of aValues.

   aValues := {"Section 1","Section 2","Section 3"}
   v1 := "Section 1"
   @10,10 get v1 send reader := pickreader(aValues,10,10)

   READ

  Source:
  -------
  S_READRS.PRG

 

 

SP_PICKNDX

PICKNDX()

  Short:
  ------
  PICKNDX() Allows user to select indexes to open

  Returns:
  --------
  <nSelected> => number of indexes selected

  Syntax:
  -------
  PICKNDX(aIndexes)

  Description:
  ------------
  Allows the user to point and shoot index selection.

  [aIndexes] is an array to fill with index names. It
  can be of any size, including {}. It is set back to {}
  before selection

  Examples:
  ---------
   aIndexes := {}
   nPicked  := pickndx(aIndexes)

  Source:
  -------
  S_PICKND.PRG

 

SP_PARSFIELD

PARSFIELD()

  Short:
  ------
  PARSFIELD() Extracts the name of the field from an expression

  Returns:
  --------
  <cField> => name of the field

  Syntax:
  -------
  PARSFIELD(cExpress)

  Description:
  ------------
  Returns the field name part of cExpress

  Examples:
  ---------
   cExpr := "CUSTOMER->LASTNAME"

   IF ISFIELD(cExpr)
     ?PARSALIAS(cExpr)  // displays CUSTOMER
     ?PARSFIELD(cExpr)  // displays LASTNAME
   ENDIF

  Warnings:
  ----------
  Does not verify if this is a valid field. Use
  ISFIELD().

  Source:
  -------
  S_FIELDS.PRG