ON KEY with EXIT INPUT: loosing field data
Posted in 1995
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. Any ideas or solutions would be welcome. I am sure others have had this problem before. -- Bruce Momjian | 830 Blythe Avenue root@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)