Herald R. Smith 24ACME Supply Company 2532 East Avenue Glendale CA91211 Jane Doe 36Earth Watch Inc 55 First Street Laguna CA90011
The MULTWIN.PRG program is a simple example of a multiple window READ operation. Some GET objects that participate in the READ are associated with WINDOW A and others are attached to WINDOW B. The READ command contains ACTIVATE and DEACTIVATE clauses.
Whenever a window is about to be activated, the ACTIVATE clause is called. Its expression contains a call to the ShowPrompt() functions that instruct the user to make corrections. The READ command calls the DEACTIVATE clause before you leave a window.
The DEACTIVATE clause consists of a call to function CheckExit(). If the user initiates some action that results in the cursor moving from a field in WINDOW A to a field in WINDOW B, the CheckExit() function displays WINDOW C with a prompt message asking the user to confirm that editing is complete. WINDOW C also contains Yes and No push buttons. The READ statement in the CheckExit() function statement activates the GET objects in WINDOW C. This READ command is an example of a READ within a READ, also called a nested READ. If the user responds in an affirmative manner by pressing the Yes push button, the nested READ exits and the CheckExit() function returns a true value (.T.) and the top level READ command exits. Otherwise, the function returns a logical false value and editing continues.