SET ESCAPE
Specifies whether pressing Esc interrupts program execution.
Syntax
SET ESCAPE ON | off
Default
The default for SET ESCAPE is ON. To change the default, set the ESCAPE parameter in PLUS.ini.
Description
The primary purpose of the Esc key is to interrupt command or program execution. While this behavior may be changed with ON ESCAPE, this behavior occurs only when SET ESCAPE is ON.
Typically, SET ESCAPE is ON during application development. This allows you to stop processes which are taking too long or have run amok. When an application is deployed, you should either:
SET ESCAPE OFF so that the user cannot cause your application to terminate abnormally, or
Define a specific ON ESCAPE behavior so that your application or process can shutdown or be canceled gracefully, usually after confirming that the user really wants to do so.
Note
If SET ESCAPE is OFF and you have not used ON KEY or some other method to interrupt your program, you can interrupt program execution only by forcing the termination of dBASE Plus or your dBASE Plus application. Forced termination can cause data loss.
Note that user interface elements such as menus, forms, and dialog boxes handle Esc differently, usually closing or dismissing that UI element. (For forms, this behavior is controlled by its escExit property). In those cases, ON ESCAPE and SET ESCAPE have no effect. In fact, with the exception of dialog boxes and forms opened with the readModal( ) method, because of the event-driven nature of dBASE Plus there is no program executing when you use a menu or type into a form, so there is nothing to interrupt.