PDA

View Full Version : Disable ESC


ABC123

russ Boehle
05-02-2000, 02:01 PM
I need to disable ESC when I zoom (in a set) to prevent the user from filling the zoom stack by not unzooming. This I can do but it needs to be conditional so ESC works in change or edit mode or in the memo editor and then is disabled again when the record is saved or memo is saved. I can get parts of this to work but the conditional part has me stumped. Any ideas?


Russ

russ Boehle
05-02-2000, 04:58 PM
I solved my own problem, just had to step back from it for a while. Used a variety of sys_trig_memo and sys_trig_rec triggers with onescape {}. Works fine.

Ken L Herrold
05-04-2000, 05:08 PM
Russ,

You have a dia/monolog going here........ Can I butt in? I'd like to see one of your solutions. I've done this with complicated custom menu changes so that "unzoom' the was only menu [get-outa-here] option on a zoom-viewed form. This solution only 'hoped' that the user wouldn't use [ESC].Can you humor me?

Ken

russ Boehle
05-05-2000, 06:14 AM
Ken
I thought that I was able to correct this problem with $sys_trig_rec_save but I was wrong It seems to work some times but not always. What I have done now is when I go to a dbf or set where I don't want esc disabled I set onescape {{whatever}} to make esc do something else. When I am at the destination dbf esc is dasabled until I need it. On sub menu I set for "C" and "E" onescape {esc} to reenable esc. and on the same submenu for F10 run onescape {{whatever}}F10 to disable esc again when a record is saved from enter or change. The problem arises when a user presses esc from change or enter mode. on the submenu I have to set esc to run escape and I can't seem to disable it after the escape is completed. I tried
"{ESC} {onescape{whatever}}" and "{esc}{onescape {set{sys_trig_rec_save,"escoff"}}" where escoff is a script to disable escape again but none of these seem to work. Escape is tough to trap (at least for me). I would live to hear ideas form anyone else on this.

Russ

Robert Picard
05-05-2000, 09:17 PM
Hi Russ

Have you thought of

{ONKEY·"{esc}",·{{If->this,{{esc},{{play my script}}}

I use something like this for {F10} which checks for the form status i.e. "enter" or "change", and the values in certain fields before the record is saved.

Hope this gives you an idea to work from.

Good luck

Robert