Re: ON KEY (ACCEPT)
Posted in 1994
merlyn@panix.com (Paul Fabozzi) writes: >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. >IN OTHER WORDS: If a user updates a record, and goes to a field to update it, >and after updating the field (while still in it) he hits ESC, the current >field is not saved, it will be reverted. This is a nightmare for me, because >I will have users that swear they updated something, and the database will say >they are lying. This is not a bug; it's expected behavior (which I guess you disagree with). See get_fldbuf() for what you want. Without it, the values in the field are not passed into the variables until the cursor never leaves the field. Instead of an ON KEY (ACCEPT), I think you might be better off with an AFTER INPUT statement. Something like: AFTER INPUT IF int_flag THEN EXIT INPUT END IF # whatever else you're doing in ON KEY (ACCEPT) could go here ======================================================================= 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. >I would live to see how some of you guys handle such a situation. >I am thinking of using the FGL_LASTKEY, but I am hoping for an easier way. >Paul Fabozzi, merlyn@panix.com