User list for a Get.
──────────────────────────────────────────────────────────────────────────────

Syntax

GT_GetList(<oGet>,<cType>,<bReturn>,<bValid>, ;
[<bFind>],[<bFor>],[<nTop>],[<nLeft>]) -> lSuccess

Arguments:

<oGet> is the Get Object passed to the post block.

<cType> is the type of window to use. 'A' uses an
array list and 'D' uses a Browse on a DBF file.

<bReturn> block to extract the information to put
into the Get field. It will be passed the element
of the array or the record number (current) in the
Browse case.

<bValid> the block stating whether the result in the
Get field is valid.

<bFind> defines which option to start on. Should
return a number for 'A' windows or a value to seek
with the browse. For Browses this will act as a
while clause against the index.

<bFor> for clause. Only for Browse lists.

<nTop> and <nLeft> specify the top left corner of
the window.

Returns:

Logical valid status.

Description:

Allow a PostBlock on a get to display the user
a list of legal options from an array or an open
datafile. Allows while/for options and displays the
list on screen. When an option is selected the list
is removed.
Requires extra information in :Cargo

Examples:

oGet:PostBlock := { | oGet | Suppliers->(Gt_GetList( ;
oGet, ; // Get object
'D', ; // Datafile
{ | | Field->Code }, ; // Return
{ | cData | DBSEEK(cData) }, ; // Valid
{ | cData | RTRIM(cData) }, ; // Seek/while
{ | | Field->Qty > 0 }, ; // For
02, ; // Top
02)) } // Left

aGets[01][01]:Cargo := { ;
{'Code','Supplier'}, ; // Titles
{{ | | Field->SuppCode }, ;
{ | | Field->SuppName }}, ; // List fields
{}} // Only used with array


Source: GT_GETLI.PRG

Author: Martin Bryant