Eliminate "unsaved changes" popup (AREV Specific)
At 19 JUN 2000 06:49:14PM Peter L. Dunlap wrote:
I would like to disable the "unsaved changes" popup. I have read other messages here regarding the "unsaved changes" popup in AREV 3.12 but have not seen any method for disabling it.
Most of my programs begin with a collector window for parameter entry and review. Upon return form the window, the program checks @PROG.CHAR for the ESC key, indicating that the user wanted to cancel the program execution. However, if a user has made any changes to the collector data, then presses the ESC key, the "unsaved changes" popup appears requiring the user to press another key. Consequently, the program can not always know that the user attempted to cancel the process and errantly proceeds.
Can anyone offer an alternative method of detecting the ESC key press in AREV 3.12, or disabling the "unsaved changes" popup in a collector window?
At 19 JUN 2000 07:12PM Don Bakke wrote:
Peter,
We just also include a check to see if @PROG.CHAR is equal to Char(13). The idea is that they have to press the key to indicate "yes" they want to exit.
At 20 JUN 2000 06:33AM Steve Smith wrote:
Peter,
If I recall there is a routine called $ESC.TO.EXIT in the verbs or SYSOBJ file which does what you want. I also have an old routine (somewhere) ($ESCTRAP) which looks in the keyboard buffer and
returns 1 if Esc was the last key hit or else 0. It has not been tested under NT, though, but I'll try dig it up for you.
At 20 JUN 2000 06:37AM Steve Smith wrote:
Late thought - I never use collectors, but is WC_OREC% or equivalent available - if it is you could simply assign @RECORD to it to prevent the change message occurring.
At 21 JUN 2000 05:11PM Jonathan Bird wrote:
Perhaps a better way of checking if the user saved from a collector window is to set up a common variable that gets set to true when the user SAVES a collector window. Then after the window you can check this variable and if it is false, you know the user did not want to save the information. I can send you examples of how I have implemented this if you require.
Jonathan
At 23 JUN 2000 04:06PM Dave Harmacek - Harmacek Database Systems wrote:
It's easier than you think. Just reserve an unused field position, say "n", (not a field updated by the collector) and put in Collector Save Code "C" Command "@RECORD=1" (don't include those quotes").
Then, in the program that called the collector check @PSEUDO. If empty, then they Escaped from the collector.