Re: 4GL: Cancel Key
Posted in 1998
dennisp@informix.com wrote: > > In article <364ABFCD.A394E838@lucent.com>, > Duncan Rance <drance@lucent.com> wrote: > > Hi, > > > > I'm fairly new to 4GL and I'm using some examples from '4GL by Example' to > help > > write a small application. > > > > The problem is that when I press control-c to cancel when in a form, the whole > > thing bombs out. I am using ACCEPT KEY RETURN in OPTIONS, but I need > something > > that does CANCEL KEY ESCAPE. Dennis has your answer as to the proper ways to do what you REALLY want, ie to trap ^C as a cancel key. Just one thing to add, you can also add 'ON KEY INTERRUPT' or 'COMMAND KEY INTERRUPT' to your DISPLAY, INPUT and MENU blocks to prevent the ^C from blowing you out of the INPUT/DISPLAY/MENU block and just handle the key (which handling may be to just exit the block anyway but it is more graceful and documents the code's behavior better going forward). Art S. Kagel