Re: ON KEY (ACCEPT)
Posted in 1994
"Andrey Yu. Grachyov" <andy@tern.msk.su> writes: > Hi, >> Its 2 weeks before we are ready to go live with our program, and I ran into an >> interesting bug. When I use the ON KEY (ACCEPT) To test if the data in the >> INPUT is ok, It does not apply the current edited field, if im in one. >I am sure that is a feature, not a bug :-) . I use the following statement >in order to solve the problem: > AFTER CONSTRUCT (or AFTER INPUT or ON KEY (ACCEPT) etc) > LET my_var.field1 = get_fldbuf(field1) > LET my_var.field2 = get_fldbuf(field2) > LET my_var.field3 = get_fldbuf(field3) > ...................... To pick nits, this can be shortened to a single statement if you add a screen record to the perform screen that matches the record variable you're doing work to: INPUT l_table.* WITHOUT DEFAULTS FROM s_table.* ... AFTER INPUT IF int_flag THEN EXIT INPUT END IF CALL get_fldbuf(s_table.*) RETURNING l_table.* ... END INPUT ======================================================================= Dennis J. Pimple dennisp@informix.com Opinions expressed Senior Consultant -------------------- are mine, and do not Informix Software Inc Voice: 303-850-0210 necessarily reflect Denver Colorado USA Fax: 303-779-4025 those of my employer.