Re: Problem in detecting user input with 4GL
Posted in 1995
From Eric Scherer: * P Jabbal (kenzo@cix.compulink.co.uk) wrote: * * [Stuff Deleted] * * : FUNCTION scroll_logs() * : DEFINE fs_count , * : fs_i SMALLINT, * : fa_cl_ap ARRAY[10] OF RECORD * : ap_pr_priority INTEGER, * : cl_status CHAR(8), * : ... * : ... * : END RECORD * * : DECLARE fc_curs CURSOR FOR SELECT * * : FROM ......... * : WHERE ......... * * : LET fs_count = 1 * * : FOREACH fc_curs INTO fa_cl_ap[fs_count].* * : LET fs_count = fs_count + 1 * * : IF fs_count < 10 THEN * : CONTINUE FOREACH * : END IF * * : LET fs_count = 1 * * : CALL set_count(10) * * : INPUT ARRAY fa_cl_ap WITHOUT DEFAULTS FROM scr_ap.* * : BEFORE ROW EXIT INPUT * > Try the ON KEY CLAUSE AT THIS POINT * > Im sure this is what your looking for!!? * * ON KEY(Fwhatever) * CALL whatever_func() THis won't work due to the order that informix processes statements for the INPUT ARRAY. Ordered as such: BEFORE ROW BEFORE INSERT/DELETE BEFORE FIELD ON KEY AFTER FIELD etc... * : END INPUT * : --- I need to test at this point if the user has pressed , say, a * : --- function key to allow the * : --- program to go off (e.g. call a function ) and do some * : unrelated * : --- 4GL processing. * * : SLEEP 15 * * : FOR fs_i = 1 TO 10 * : INITIALIZE fa_cl_ap[fs_i].* TO NULL * : DISPLAY fa_cl_ap[lfs_i].* TO scr_ap[fs_i].* * : END FOR * : END FOREACH * * : END FUNCTION * * >> By he way this is pretty well documented * * Eric L. Scherer * erics@winternet.com * * Robert Minter |Data Systems Support| \\\\\\_/// Programmer, Software Development | Orange, CA | ( _ _ ) rob@dssmktg.com | Tel: 714.771.0454 | (| ^ |) De Colores - Emmaus OC-13 | Fax: 714.771.3028 | \\`-'/ #include <disclaimer.h> SURF'S UP \\_/