Re: ON KEY with EXIT INPUT: loosing field data
Posted in 1995
root@candle.pha.pa.us (Bruce Momjian) wrote: > > I am designing an application that uses function keys to move from > screen to screen. I have successfully used ON KEY to EXIT INPUT when a > function key is pressed. > > However, I have run into the problem described in the INPUT manual page. > The ON KEY command expects to return to the current field. Because my > ON KEY contains an EXIT INPUT statement, any data changes in the current > field are discarded when the EXIT INPUT is done. > > The manual says that I can do a NEXT FIELD to another field to keep the > changed data. I tried that, but it only works if the cursor actually > lands in the new field. Doing a NEXT FIELD and then a BEFORE FIELD > containing an EXIT INPUT does not save field changes. The problem is I > can not actually land in another field because the function key press is > supposed to take me to another form. > > Now, the only solution I can think of is to call a C function from the > ON KEY which will stuff an ESCAPE into the keyboard buffer, so the > function key will simulate an ACCEPT key. The problem there is that I > am developing for SCO 3.2.2 (ech!), which does not have a TIOCSTI-type > call. This is a really good question. I've also had this problem which I let the users get used to. Someone must have a good solution!