* contrib/hbct/tests/ctwtest.prg
* contrib/hbcups/tests/test.prg
* contrib/hbfbird/tests/stress.prg
* contrib/hbnf/aredit.prg
* contrib/hbnf/doc/en/aredit.txt
* contrib/hbnf/menu1.prg
* contrib/hbnf/popadder.prg
* contrib/hbnf/tbwhile.prg
* contrib/hbpgsql/tests/async.prg
* contrib/hbpgsql/tests/cache.prg
* contrib/hbpgsql/tests/stress.prg
* contrib/hbpgsql/tests/test.prg
* contrib/hbtip/tests/tiptest.prg
* contrib/xhb/tests/compress.prg
* doc/en/sayget.txt
* src/rtl/profiler.prg
* tests/ac_test.prg
* tests/boxtst2.prg
* tests/fortest.prg
* tests/menutest.prg
* tests/mt/mttest11.prg
* tests/parseini.prg
* tests/speedold.prg
* tests/tstchbx.prg
* tests/usrrdd/exarr.prg
* tests/videotst.prg
* tests/vidtest.prg
* formatting
! deleted SetMode()s
* CLEAR SCREEN -> CLS
* other minor cleanups
76 lines
2.5 KiB
Plaintext
76 lines
2.5 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/* $DOC$
|
|
* $FUNCNAME$
|
|
* FT_AREDIT()
|
|
* $CATEGORY$
|
|
* Array
|
|
* $ONELINER$
|
|
* 2 dimensional array editing function using TBrowse
|
|
* $SYNTAX$
|
|
* FT_AREDIT( <nTop>, <nLeft>, <nBottom>, <nRight>, <Array Name>, ;
|
|
* <nElem>, <aHeadings>, <aBlocks> [, <bGetFunc> ] ) -> xElement
|
|
* $ARGUMENTS$
|
|
* <nTop>, <nLeft>, <nBottom>, <nRight> are coordinates for TBrowse
|
|
*
|
|
* <Array Name> is name of 2 dimensional to array edit
|
|
*
|
|
* <nElem> is pointer for element in array
|
|
*
|
|
* <aHeadings> is array of column headings
|
|
*
|
|
* <aBlocks> is array of blocks describing each array element
|
|
*
|
|
* [ <bGetFunc> ] is get editing function for handling individual elements
|
|
* $RETURNS$
|
|
* Value of element positioned on when exit FT_AREDIT()
|
|
* The type of this value depends on what is displayed.
|
|
* $DESCRIPTION$
|
|
* This function allows you to position yourself in an array,
|
|
* add and delete rows with the <F7> and <F8> keys,
|
|
* and pass a UDF with information to edit the individual gets.
|
|
* $EXAMPLES$
|
|
* FT_AREDIT(3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks)
|
|
*
|
|
* This example will allow you to browse a 2 dimensional array
|
|
* But you can't edit it since there is no GetBlock UDF
|
|
* It allows the user to hit ENTER to select an element or ESC to
|
|
* return 0
|
|
*
|
|
* * This second example shows how to edit a 2 dimensional array
|
|
* * as might be done to edit an invoice
|
|
*
|
|
* LOCAL i, ar[3, 26], aBlocks[3], aHeadings[3]
|
|
* LOCAL nElem := 1, bGetFunc
|
|
*
|
|
* * Set up two dimensional array "ar"
|
|
*
|
|
* FOR i = 1 TO 26
|
|
* ar[1, i] := i // 1 -> 26 Numeric
|
|
* ar[2, i] := CHR(i+64) // "A" -> "Z" Character
|
|
* ar[3, i] := CHR(91-i) // "Z" -> "A" Character
|
|
* NEXT i
|
|
*
|
|
* * SET UP aHeadings Array for column headings
|
|
*
|
|
* aHeadings := { "Numbers", "Letters", "Reverse" }
|
|
*
|
|
* * Need to set up individual array blocks for each TBrowse column
|
|
*
|
|
* aBlocks[1] := {|| STR(ar[1, nElem], 2) } // prevent default 10 spaces
|
|
* aBlocks[2] := {|| ar[2, nElem] }
|
|
* aBlocks[3] := {|| ar[3, nElem] }
|
|
*
|
|
* * set up TestGet() as the passed Get Function so FT_ArEdit knows how
|
|
* * to edit the individual gets.
|
|
*
|
|
* bGetFunc := { | b, ar, nDim, nElem | TestGet(b, ar, nDim, nElem) }
|
|
* SetColor( "N/W, W/N, , , W/N" )
|
|
* CLS
|
|
* FT_AREDIT(3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks, bGetFunc)
|
|
*
|
|
* $END$
|
|
*/
|