FT_DISPMSG

()
 Display a message and optionally waits for a keypress

 Syntax

      FT_DISPMSG( <aMessageArray>, [ <cKey2Check> ],
                  [ <nTopBoxRow> ], [ <nLeftBoxColumn> ],
                  [ <cBoxType> ], [ <lShadow> ] ) -> lKeyMatch

 Arguments

     <aMessageArray> is a multidimensional array of messages to be
     displayed and the color attributes for each message.

     The first dimension of the array contains one or more elements,
     each representing one line in the message box, up to the maximum
     number of rows on the screen.

     The second dimension of the array contains a color attribute for
     the corresponding element in dimension one, plus one additional
     element for the color of the box border.  Dimension two will
     always contain one more element than dimension one.  If an
     attribute is omitted, the last color selected will be used.

     <Key2Check> is a character string of one or more keys to check
     for.  If omitted, the message is displayed and control is returned
     to the calling procedure.  If one character is specified,
     FT_DISPMSG() waits for one keypress, restores the screen and
     returns.  If multiple characters are specified, FT_DISPMSG()
     remains in a loop until one of the specified keys has been
     pressed, then restores the screen and returns.

     <nTopBoxRow> is the upper row for the message box.  If omitted, the
     box is centered vertically.

     <nLeftBoxColumn> is the leftmost column for the box.  If omitted, the
     box is centered horizontally.

     <cBoxType> is a string of characters or a variable for the box
     border.  See the @...BOX command.  If omitted, a double box is
     drawn.

     <lShadow> is a logical variable.  If true (.T.) or omitted, it
     uses FT_SHADOW() to add a transparent shadow to the box.  If
     false (.F.), the box is drawn without the shadow.

 Returns

     If <Key2Check> is not specified, FT_DISPMSG() will return false
     (.F.).

     If <Key2Check> is a one-character string, FT_DISPMSG() will return
     true (.T.) if the user presses that key, or false (.F.) if any
     other key is pressed.

     If <Key2Check> consists of multiple characters, it will lock the
     user in a loop until one of those keys are pressed and return the
     INKEY() value of the keypress.

 Description

     FT_DISPMSG() is a multi-purpose pop-up for user messages.
     Multiple lines may be displayed, each with a different attribute.
     The box will be automatically centered on the screen, or the row
     and/or column can be specified by the programmer.  It also centers
     each line of the message within the box.

 Examples

     The following example displays a simple two-line message
     and returns immediately to the calling routine.

        FT_DISPMSG( { { "Printing Report"                    , ;
                        "Press [ESC] To Interrupt" }         , ;
                      { "W+/B*", "W/B", "GR+/B" } } )

     The next example displays a message and waits for a key press.

        FT_DISPMSG( { { "Press [D] To Confirm Deletion"      , ;
                        "Or Any Other Key To Abort" }        , ;
                      { "W+/B", "W+/B", "GR+/B" } }          , ;
                      "D" )

     The next example displays a one-line message centered on row 5
     and returns to the calling procedure.

        FT_DISPMSG( { { "Please Do Not Interrupt" }   , ;
                      { "W+/B", "GR+/B" } }          , ;
                      , 5, )

 Source: DISPMSG.PRG

 Author: Paul Ferrara

 

FT_CLRSEL

FT_CLRSEL()
 User Selectable Colour Routine

 Syntax

      FT_ClrSel( <aClrData>, [ <lClrMode> ], [ <cTestChr> ]  -> aClrData

 Arguments

     <aClrData> is an array of subarrays, with each subarray containing
        information about the colour settings.

        The subarray has the following structure:

         [1]  cName    is the name of this colour setting i.e. "Pick List"
                 Maximum length is 20 bytes

         [2]  cClrStr  is the current colour string
                 Default is "W/N,N/W,N/N,N/N,N/W"

                 If Setting type is "M" (Menu) the colours are...
                    1.  Prompt Colour
                    2.  Message Colour
                    3.  HotKey Colour
                    4.  LightBar Colour
                    5.  LightBar HotKey Colour

                 Note: While there are many ways to code the individual
                    colour combinations,  they should be in the same
                    format that gets returned from SETCOLOR(), so
                    the defaults can be found in the colour palette.

                    foreground [+] / background [*]
                    i.e. "GR+/BG*, N/W*, N+/N, , W/N"

         [3]  cType  is the type of colour setting
                 Default is "W" (Window)

                    T = Title     Only 1 colour element
                    D = Desktop   Background colour and character
                    M = Menu      For FT_Menuto() style menus
                    W = Window    Windows with radio buttons
                    G = Get       For use with @ SAY...
                    B = Browse    For tBrowse() and *dbEdit()
                    A = aChoice   Pick-lists etc...

                 W/G/B/A are functionally the same but will provide
                 a more appropriate test display.

         [4]  cFillChar  is the character (for desktop background only)
                 Default is CHR(177) "##############"

     <lClrMode>   .T.  use colour palette
                 .F.  use monochrome palette

                 Default is the ISCOLOR() setting

     <cTestChr>  2 Byte character string for colour test display

                 Default is the CHR(254)+CHR(254)  "......"

 Returns

     An array identical to the one passed, with new selected colours

 Description

       This function allows users to select their own colour combinations
     for all the different types of screen I/O in a typical application.
     This facilitates an easy implementation of Ted Means' replacement
     of the  @..PROMPT/MENU TO found in the NanForum Toolkit.  If you are
     not using FT_MENUTO(), you can specify "A" for setting type and have
     a normal colour string returned.

 Examples

     LOCAL aClrs   := {}
     LOCAL lColour := ISCOLOR()
     LOCAL cChr    := CHR(254) + CHR(254)

     SET SCOREBOARD Off
     SETBLINK( .F. )       // Allow bright backgrounds

     *.... a typical application might have the following different settings
     *     normally these would be stored in a .dbf/.dbv
     aClrs := {;
        { "Desktop",        "N/BG",                         "D", "#" }, ;
        { "Title",          "N/W",                          "T"      }, ;
        { "Top Menu",       "N/BG,N/W,W+/BG,W+/N,GR+/N",    "M"      }, ;
        { "Sub Menu",       "W+/N*,GR+/N*,GR+/N*,W+/R,G+/R","M"      }, ;
        { "Standard Gets",  "W/B,  W+/N,,, W/N",            "G"      }, ;
        { "Nested Gets",    "N/BG, W+/N,,, W/N",            "G"      }, ;
        { "Help",           "N/G,  W+/N,,, W/N",            "W"      }, ;
        { "Error Messages", "W+/R*,N/GR*,,,N/R*",           "W"      }, ;
        { "Database Query", "N/BG, N/GR*,,,N+/BG",          "B"      }, ;
        { "Pick List",      "N/GR*,W+/B,,, BG/GR*",         "A"      }  ;
              }

    aClrs := FT_ClrSel( aClrs, lColour, cChr )

 Source: CLRSEL.PRG

 Author: Dave Adams

 

FT_BRWSWHL

FT_BRWSWHL()
 Browse an indexed database limited to a while condition

 Syntax

      FT_BRWSWHL( <aFields>, <bWhileCond>, <cKey>,                  ;
                  [ <nFreeze> ], [ <lSaveScrn> ], [ <cColorList> ], ;
                  [ <cColorShadow> ], [ <nTop> ], [ <nLeft> ],      ;
                  [ <nBottom> ], [ <nRight> ] -> nRecno

 Arguments

     <aFields> is array of field blocks of fields you want to display.
        Example to set up last name and first name in array:
        aFields := {}
        AADD(aFields, {"Last Name" , {||Names->Last}  } )
        AADD(aFields, {"First Name", {||Names->First} } )

     <bWhileCond> is the limiting WHILE condition as a block.
        Example 1: { ||Names->Last == "JONES" }
        Example 2: { ||Names->Last == "JONES" .AND. Names->First == "A"  }

     <cKey> is the key to find top condition of WHILE.
        cLast  := "JONES     "
        cFirst := "A"
        Example 1: cKey := cLast
        Example 2: cKey := cLast + cFirst

     <nFreeze> is number of fields to freeze in TBrowse.  Defaults
     to 0 if not passed.

     <lSaveScrn> is a logical indicating whether or not you want to
     save the screen from the calling program.  Defaults to .T. if
     not passed.

     <cColorList> is a list of colors for the TBrowse columns.
     The 1st color is used as SAY/TBrowse Background and the
     3rd and 4th colors are used as part of column:defColor := {3, 4}

     Thus if you pass a cColorList, you MUST pass at least 4 colors.
     Defaults to "N/W, N/BG, B/W, B/BG, B/W, B/BG, R/W, B/R" if not passed.

     <cColorShad> is the color of the TBrowse box shadow.  Defaults
     to "N/N" if not passed.

     <nTop>, <nLeft>, <nBottom>, <nRight> are the coordinates of
     the area to display the TBrowse in.  Defaults to 2, 2,
     MAXROW() - 2, MAXCOL() - 2 with shadowed box, i.e. full screen.

 Returns

     nRecno is the number of the record selected by the <Enter> key.
     0 is returned if there are either no records matching the WHILE
     condition or an <Esc> is pressed instead of an <Enter>

 Description

     This is a demonstration of TBrowse with a WHILE condition for an
     indexed database.

 Examples

     * This example will only show those people with last name of "JONES"
     * in the TBNames.dbf which contains at least the fields:
     * Last, First, City AND is indexed on Last + First.
     LOCAL nRecSel    := 0
     LOCAL aFields    := {}
     LOCAL bWhile     := {||TBNames->Last = "JONES"}
     LOCAL cKey       := "JONES"
     LOCAL nFreeze    := 1
     LOCAL lSaveScrn  := .t.
     LOCAL cColorList := "N/W, N/BG, B/W, B/BG, B/W, B/BG, R/W, B/R"
     LOCAL cColorShad := "N/N"

     USE TBNames INDEX TBNames NEW // indexed on Last + First

     * Pass Heading as character and Field as Block including Alias
     * To eliminate the need to use FIELDWBLOCK() function in FT_BRWSWHL()
     AADD(aFields, {"Last Name" , {||TBNames->Last}  } )
     AADD(aFields, {"First Name", {||TBNames->First} } )
     AADD(aFields, {"City"      , {||TBNames->City}  } )

     IF FT_BRWSWHL( aFields, bWhile, cKey, nFreeze, lSaveScrn, ;
        cColorList, cColorShad, 3, 6, MaxRow() - 2, MaxCol() - 6) == 0
        ? "Sorry, NO Records Were Selected"
     ELSE
        ? "You Selected: " + TBNames->Last +" "+ ;
           TBNames->First +" "+ TBNames->City
     ENDIF

 Source: TBWHILE.PRG

 Author: Jim Orlowski

 

FT_BLINK

FT_BLINK()
 Display a blinking message on the screen

 Syntax

      FT_BLINK( <cMsg>, [ <nRow> ], [ <nCol> ] ) -> NIL

 Arguments

     <cMsg> is the string to blink.

     <nRow> is an optional screen row for @...SAY, default current.

     <nCol> is an optional screen col for @...say, default current.

 Returns

     NIL

 Description

     A quick way to blink a msg on screen in the CURRENT colors.
     Restores colors on return.

 Examples

     FT_BLINK( "WAIT", 5, 10 )   // Blinks "WAIT" in current colors @ 5,10

     @5,10 SAY "WAIT - Printing Report"
     FT_BLINK( "..." )           //  Blink "..." after wait message...

 Source: BLINK.PRG

 Author: Terry Hackett

FT_ADDER

FT_ADDER()
 Pop up a simple calculator

 Syntax

       FT_Adder()

 Arguments

      None

 Returns

      NIL .... but optionally places Total of calculation in active
               Get variable using oGet:VARPUT()

 Description

      PopAdder() gives you an adding machine inside your Clipper 5.01
      application. It has the basic functions add, subtract, multiply,
      and divide. You may move it from one side of the screen to the
      other. It even displays a scrollable tape, if you want it.

      The Help screen below gives a brief description of the operation
      of the adder.

                  +------- INSTRUCTIONS -------+
                  |                            |
                  | All number keys as usual   |
                  | <+> <-> keys as usual      |
                  | <SPACE>---shift <+> to <*> |
                  |         +-shift <-> to </> |
                  |  <D>    change decimal pt. |
                  |  <M>    move ADDER         |
                  |  <T>    display tape       |
                  |  <S>    scroll tape disp.  |
                  | <DEL>-----1st Clear entry  |
                  |         +-2nd Clear ADDER  |
                  | <ESC>   to Quit            |
                  | <F10>   to Return Total    |
                  |           to program       |
                  |                            |
                  +---- Any Key to Continue ---+

      A couple of notes about the adder:

      1.) It was designed to be used on an Enhanced keyboard with
          separate <DELETE> key. <DELETE> is used to clear the adder.
          However, it will still work on a Standard keyboard.

      2.) It uses the <SPACE> bar to shift from Add/Subtract
          mode to Multiply/Divide. That means the <+> and <-> keys
          become the <*> and </> keys.

      3.) You do not have to display the tape. You may turn it on
          at any time by pressing <T>. You may SCROLL back through
          the tape once there are more than 16 entries in the
          adder, by pressing <S>.

      4.) To Quit the Adder just press <ESC>. To return your Total
          to the application press <F10>. The adder will place the
          Total in the active GET variable using oGet:VarPut(). The
          adder will only return a Total to a numerical GET!

      5.) There are many support functions that you might find
          interesting. They are part of my personal library, but
          are necessary to the operation of the adder.
          You might want to pull these out to reduce the overall
          size of the adder. Many are worth at least a little
          time studying.

      6.) To make FT_Adder a Hot key from inside your application
          at the beginning of your application add the line:

                 SET KEY K_ALT_A  TO FT_Adder

          This will make <ALT-A> a key "Hot" and permit you to
          Pop - Up the adder from anywhere in the application.

      7.) If you use FT_SINKEY(), you can even have active hotkeys
          in an INKEY().

 Examples

 Header File: INKEY.CH, SET.CH, SETCURS.CH, ACHOICE.CH

 Source: POPADDER.PRG

 Author: Keith A. Wire

 

FT_ACH2TB

FT_ACH2TB()
 Replace ACHOICE() with a Tbrowse object & multiple features.

 Syntax

      FT_Ach2tb( <nToprow>,<nTopcol>[,<nBotrow>][,<nBotcol>],<aArrey>,     ;
            [<cBoxtype>],[<cBoxcolor>],[<cBoxtitle>],[<nTitlePos>],        ;
            [<cUselcolor>],[<cTitlecolor>],[<cBarcolor>],[<cHkcolor>],     ;
            [<lShadow>],[<lExecute>],[<nMsgrow>],[<nMsgcol>],              ;
            [<cMsg.color>],[cElevbar],[cEbarcolor],[<cEbarside>],          ;
            [<cNoSelcolor>],[<cTagch>],[<nStartelem>],[<lRscreen>],        ;
            [<nTimeout>],[<nTimeoutval>],[<cUserfunc>] )
       --> nOption

 Arguments

  <nToprow>   is the top row of the box to be drawn.  Required.

  <nTopcol>   is the top column of the box to be drawn.  Required.

  <nBotrow>   is the bottom row of the box to be drawn.  The default is
     <nToprow>+Len(<aArrey>)+1 or maxrow()-2, whichever is less.

  <nBotcol>   is the bottom column of the box to be drawn.  The default
     is <nTopcol>+width of the widest element in <aArrey> +2.

     It's been pointed out that the number of commas required to default
     the <nBotrow> and <nBotcol> params. is at least slightly confusing.
     So, some documentation on the requirements:
     Default both:                           7,9,,   ARRAY:
     Default <nBotrow>, specify <nBotcol>:   7,9,,20 ARRAY:
     Default <nBotcol>, specify <nBotrow>:   7,9,15, ARRAY:

  <aArrey>    is the arrey of options to present to the user.  Each
     element can hold as many as five subelements, or as few as one.
     Required.  Additional documentation below.

  <cnBoxtype> is the type of box to draw.  Uses DispBox().  The
     default is a double-line box.

  <cBoxcolor> is the color with which to draw the box.  The default is
     Setcolor().

  <cBoxtitle> is title of the box drawn on <nToprow>.  The default is
     no title.

  <nTitlepos>  is the starting column position (to the right of
     <nTopcol>) at which to draw <cBoxtitle>.  The default is 1.

  <cUselcolor> is the color with which to draw unselected options.
     The default is Setcolor().

  <cTitlecolor> is the color with which to draw the box title.  The
     default is yellow on red.

  <cBarcolor>  is the color with which to draw the selection bar.
     The default is yellow on black.

  <cHkcolor>  is the default color with which to draw the hotkeys for
     for each option.  This is used when no hotkey color is supplied
     in <aArrey>.  The default is hiwhite on the current background
     color.

  <cShadow>   is a character string, either "L" or "R" (for left or
     right) to designate the side of the box where a shadow will appear.
     Leave this NIL to avoid drawing a shadow.  You might also leave
     this NIL if you choose to use a .C or .ASM shadow function, which
     is a good idea.  Shadoww(), included below, is flat-out SLOW.

  <lExecute>  turn on/off execution of option when first letter is
     pressed.  Rule:  setting in element 5 of each <aArrey> subarray
     overrides <lexecute>.  If that element is left NIL, the <lexecute>
     setting is used.  If <lexecute> is not passed and element 5 is NIL,
     auto execution is turned ON.

  <nMsgrow>  is the row on which to draw a message for each option.
     The default is two rows below the bottom of the box.

  <nMsgcol>  is the column at which to draw a message for each option.
     The default is <nTopcol> +2.  To CENTER the message, pass "C".

  <cMsgcolor>  is the default color with which to draw messages.  This
     color is used when element 4 of each <aArrey> subarray is left NIL.
     The default is Setcolor().

  <cElevbar>  is the ASCII character to use as the elevator bar drawn
     on the box.  Leave this NIL to draw no elevator bar.

  <cEbarcolor>  is the color with which to draw the elevator bar.
     This is ignored if <cElevbar> is NIL.

  <cEbarside>  is a character string, either "L" or "R" (for left or
     right) to designate the side of the box on which to draw the
     elevator bar.  This is ignored if <cElevbar> is NIL.

  <cNoselcolor>  is the color with which to draw unselectable options.
     The default is white on black.

  <cTagchar> is the ASCII character to use to draw tags that would
     appear to the right of each option.  The default is *DIS*abled
     tagging.  The default tag is "." (chr(251)).

  <nStartelem>  is the number of the option where the selection bar
     will first be placed.  Leave this NIL to begin at option 1.

  <lRestscrn>  is a logical to designate whether or not the screen
     coordinates occupied by the box and/or shadow should be restored
     before FT_Ach2tb() returns.  The default is .T.

  <nTimeout>  is the number of seconds after which FT_ACH2TB() will
     timeout and return to the function/proced. which called it.  The
     default is 0.

  <nTimeoutVal> is an optional alternative numeric value FT_ACH2TB() will
     RETURN when/if it times out.  The default is the current element
     number.

  <bUserfunc>  is a code block containing a function call to be
     executed after each key press.  You need to write just two formal
     parameters to allow the run-time passing of the key pressed and the
     current element number, e.g.:
               { |key,num| Myfunc( key,num [,other params.] ) }
     Unlimited extra parameters may be passed.  Of course, make certain
     to also write 'receptors' for them in 'Myfunc()' itself...as in the
     above example.  The default is NO user function.

 Returns

     the number of the selected option, or 0 if [Esc] is pressed.

 Description

     FT_Ach2tb() is a greatly enhanced, fully featured, and now mouse-
     supported replacement for Achoice(), based on a Tbrowse object.
     Each element of <aArray> (the array you pass to it) is itself an
     array.  Each element can solely composed of "Option" (below), but
     may be composed as follows to take full advantage of the function's
     features:

         Option   ,     Message      ,HotKeyPos,HotKeyColor,Selectable
     { "Utilities","System Utilities", 3       ,"+gr/b"    ,.T. }

     All elements except for the first, the option itself, are optional.
     IF 'Message' is NIL, no message is displayed.  'HotKeyPos' is the
     position within 'Option' of the hotkey.  In the example above, the
     hotkey for 'Utilities' is the first 'i', i.e., at position 3.  The
     default is 1.  'HotKeyColor' is the color to use for the hotkey
     display.  The default is hiwhite  on the current background color.
     'Selectable' is a logical indicating whether or not that option can
     be selected.  The default is .T.

     The A_CHOICE() UDC in FT_ACH2T.CH makes using FT_ACH2TB() a breeze.
     The myriad of parameters can be written in any order.  Only <nToprow>,
     <nTopcol>, and <aArrey> are required.  See the example below.

     There may be some confusion over 'unselected' and 'unselectable'
     options.  The former refers to any option not currently covered
     by the selection bar.  The latter refers to options you have
     designated unselectable in subelement 5 of <aArray>, i.e., by
     writing .F.

     To enable tagging, pass any ASCII character as <cTagchar>.  To
     tag/untag all options, press [SPACE].  To tag/untag individual
     options, press [+] and [-] respectively.  On press of [+], browse
     moves to the next element in the display.  To test for the tagged
     status of an option, use the WAS_TAGGED() UDC in FT_ACH2T.CH. To
     check the entire array for tags, use Aeval() in conjunction with
     Was_Tagged() as in the example below.  When tagging is enabled, the
     string "Tags" will be written across the bottom row of the box in
     hiwhite on the current background color.

     Because FT_ACH2TB() takes over the [SPACE],[+], and [-] keys, it saves
     any SET KEY procedures you might have set them to, and restores same
     on returning.  Any other procedures you might have SET KEYs to will
     fly when FT_ACH2TB() is called...thanks to the Inkey() replacement,
     SKINkey().

     The pi.ce de resistance of FT_ACH2TB() is its ability to execute
     a user function designed entirely by you.  It is called after each
     keypress, and because it is completely open-ended, extends the
     the reach of FT_ACH2TB() to the limits of Clipper.  See the docu-
     mentation under <bUserfunc> above.

     Test compile:  CLIPPER ft_ach2t /n/w/m/dFT_TEST
     Test link   :  RTLINK FI ft_ach2t LIB nanfor /pll:base50

     Mouse support
     =============
     Mouse support is provided via the Nanforum Toolkit FT_M* functions.
     Most actions are tied to the left button.  The equivalent of pressing
     [Esc] comes via the right button.  These left button clicks will
     produce the designated actions:

     Mouse cursor outside box                :  K_ENTER (select option)
     Mouse cursor at box top left corner     :  browse:goTop()
                         bottom left corner  :  browse:goBottom()
                         top right corner    :  browse:pageUp()
                         bottom right corner :  browse:pageDown()

     Mouse cursor at option, tagging ENabled
     --------------------------------------------
     Selection bar moves to option, subsequent press to tag or untag.  Do
     this for as many options as you want to tag/untag, then move mouse
     cursor outside the box.  Press again to select.  Tagging overrides
     <lExecute>, so with tagging on and <lExecute> .F., subsequent presses
     while inside the box coordinates simply tag/untag.

     Mouse cursor at option, tagging DISabled
     ---------------------------------------------
     IF <lExecute> is turned on, the option is immediately selected.  If
     turned off, selection bar moves to option.  Press again to select.

     To Disable Mouse Support
     ------------------------
     Compile with /dNOMOUSE

 Examples

  nOpt := A_CHOICE( 7,9,, ARRAY:t_array )   // the minimum

  nOpt := A_CHOICE( 7,9,, ;
            ARRAY:t_arrey ;
            USERFUNC:{|a,b| UserFunc(a,b,any1)};
            BOXTYPE:B_SINGLE  ;
            BOXTITLE:title  ;
            SHADOW:"FT" ;
            TAGCHAR:chr(17) ;
            REST_SCREEN:.F. ;
            AUTOEXEC:.F. ;
            MES_COLOR:MSG_COLOR ;
            ELEVBAR:"#" ;
            NOSELCOLOR:"bg/n" ;
            MES_COL:"C" )

  Check only the RETURNed element for whether tagged:
  IF( Was_Tagged(chr(17),t_arrey,nOpt), MoreProcessing(), )

  Check entire 't_arrey':
  Aeval( t_arrey,{|e,n| IF( Was_Tagged(chr(17),t_arrey,n ), ;
                            MoreProcessing(t_arrey),NIL ) } )

 Source: ACH2TB.PRG

 

FT_A_CHOICE

A_CHOICE()
 Psuedo function to simplify FT_ACH2TB()

 Syntax

      See FT_ACH2TB()

 Arguments

     See FT_ACH2TB()

 Returns

     See FT_ACH2TB()

 Description

     The A_CHOICE() UDC in FT_ACH2T.CH makes using FT_ACH2TB() a breeze.
     The myriad of parameters can be written in any order.  Only <nToprow>,
     <nTopcol>, and <aArrey> are required.  See the example below.

     Be sure to check the documentation for ft_ach2tb() for more
     details.

 Examples

  nOpt := A_CHOICE( 7,9,, ARRAY:t_arrey USERFUNC:{|a,b| UserFunc(a,b,any1)};
          BOXTYPE:B_SINGLE  BOXTITLE:title  SHADOW:"R" TAGCHAR:chr(17);
          REST_SCREEN:.F. AUTOEXEC:.F. MES_COLOR:MSG_COLOR ELEVBAR:"#" ;
          NOSELCOLOR:"bg/n")

  Check only the RETURNed element:
  IF Was_Tagged(chr(17),t_arrey,nOpt); MoreProcessing(); END

  Check entire 't_arrey':
  Aeval( t_arrey,{|e,n| IF( Was_Tagged(chr(17),t_arrey,n ), ;
                            MoreProcessing(t_arrey),NIL ) } )

 Source: FT_ACH2T.CH

See Also: FT_ACH2TB()

 

FT_FERROR()

FT_FERROR()

Return the error code for a text file operation

Syntax

 FT_FERROR() -> nErrorNo

Arguments

None

Returns

The DOS error code if one occurred. See a reference on DOS error
codes for an explanation of what the code means.

Description

This function returns the DOS error code associated with a file
operation on the currently selected text file.

Errors could stem from any open, create, read or write operation,
among others.

Examples

IF FT_FUSE( “text.c” ) < 0 // open text file
err  :=  FT_ERROR()
QOUT( ‘Error opening file “Text.c”, error code (‘ + ;
LTRIM( STR( err ) ) + ‘)’ )
ENDIF

Source: FTTEXT.C

Author: Brice de Ganahl and Steve Larsen

See Also: FT_FUSE() FT_FSELECT() C5_FERROR