Events That Trigger a Foundation READ in FoxPro

ID: Q93622

2.00 2.50 2.50a | 2.50 2.50a

MS-DOS          | WINDOWS
kbprg

The information in this article applies to:

SUMMARY

Microsoft FoxPro supports a READ command that does not contain any GET clauses. It is termed a "foundation READ." A foundation READ is the controlling READ command that has a VALID clause. The VALID clause controls nested, or child, READ commands. The VALID clause in a foundation READ is triggered by events that would terminate the READ command, such as the following:

MORE INFORMATION

A CLEAR READ invokes the READ VALID clause only on a foundation READ. For example, consider an application that starts a foundation READ as indicated below:

   DO MAIN.MPR
   READ VALID handler()    &&  Wait for the user to take action.

A menu option executes a screen set and invokes a child (nested) READ command. In this session, the application issues a CLEAR READ command. Doing so terminates both READ commands and triggers the VALID clause for the foundation READ. However, if the child READ command issues another (third) READ command, terminating the third READ command does not trigger the VALID clause.

During a normal READ command (with a GET clause), the following events trigger the VALID clause: pressing CTRL+W, pressing ESC, pressing the TAB key past the last GET when READ CYCLE is off, or pressing TAB past the first GET when READ CYCLE is off. Note that issuing a CLEAR READ command does not trigger the VALID clause.

During a foundation READ (without a GET clause), the following events trigger the VALID clause: pressing CTRL+W, pressing ESC, clicking the mouse, and any key press that does not correspond to a menu selection or to an ON KEY LABEL command.

Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a keypress KBCategory: kbprg KBSubcategory: FxprgGeneral

Keywords          : FxprgGeneral 
Version           : 2.00 2.50 2.50a | 2.50 2.50a
Platform          : MS-DOS WINDOWS

Last Reviewed: April 30, 1996