Notes on my array handling get system:

I wrote three UDCs which make use of the internal function _GET_() to create an
array containing two sub-arrays with the SAY information and the GET block.
They are in GETS.CH.

In order to be able to GET array variables defined in a loop, the _GET_()
internal function is required (as far as I could determine) to set up the
corrent get-set block for the array variables.  In addition I added an
optional clause, [AVALID <avalid>], which generates a modified get:postBlock
which passes the subscript of the active getlist object and and the get object
itself as parameters to the avalid function.  Adding the get object allows
complete access to the array variable.  This does not affect the previous
VALID clause.

The avalid parameter must be a call to a function,  e.g.
  ADD GET @ 5,5 get aTest[ix] AVALID ck_test(some_parm)

The first two local parameters in the called function will be the subscript
of the active getlist object and the get object  e.g.

function ck_test(get_no, get_obj, some_parm)
....
return .T.

I also added the ability to set your own get_obj:name value.  See DEMO.PRG


Doing this also required changing ReadModal() (I wrote my own version,
Get_Reads()), to include the subscript and the object as the third and fourth
parameters passed to the get:postBlock.

The Read_Gets() function does not have any pre-validation (WHEN) routine since
I am not using it at this time.  It should be easy to add back in and to add
the WHEN clause to the UDCs and the Add_Get() function.


The demo should complile as written.  In my message, I said the routines were
window based.  The only changes you need to make to incorporate a window based
system is to adjust the row and col variables in the Add_Get() function before
you assign those values to get_obj:row and get_obj:col.

If anyone has any suggestions I would be glad to here from them.  The thing I
would most like to see changed is the use of the internal _GET_() function.  I
don't know how to create the get-set block for the get object without using
private variables and macros for GETs which are array items set up in a loop.

Good Luck,

Jim Senkler
More than Computers
73777,253
