EDITING phrase
Identifies the process that follows each keystroke during a PROMPT-FOR, SET, or UPDATE statement.
This phrase is maintained primarily for compatibility with Progress Version 6 or earlier.
Note: Does not apply to SpeedScript programming.Syntax
statement
ExampleThis procedure lets you update the
ix
variable, and immediately processes each of your keystrokes. The READKEY statement reads each of the keys you press. The APPLY statement applies, or executes, each keystroke. This is a very simple EDITING phrase and is the same as entering UPDATE ix.
The following r-edit2.p procedure uses an EDITING phrase with an UPDATE statement to control what happens based on each keystroke during the UPDATE. Here, the user can press any key while updating any field except
SalesRep
.While in the
SalesRep
field, the user can press SPACEBAR to scroll through the possible values for theSalesRep
field. If the user presses the TAB, BACKTAB, GO, RETURN, or END-ERROR key, the procedure executes that key. If the user presses any other key while in theSalesRep
field, the terminal beeps.
Notes
- A READKEY statement does not have to be the first statement after the word EDITING. However, it should appear somewhere in the EDITING phrase because the AVM does not automatically read keystrokes when you use an EDITING phrase.
- The EDITING phrase applies to the PROMPT-FOR part of a SET or UPDATE statement. Therefore, to examine a value supplied by the user (within an EDITING phrase), you must use the INPUT function to refer to the field or variable that contains the value.
- When you use the NEXT statement in an EDITING phrase, the AVM executes the next iteration of that EDITING phrase and cancels any pending GO.
- When you use the LEAVE statement in an EDITING phrase, the AVM leaves the EDITING phrase and executes the assignment part of the SET or UPDATE statement.
- Within an EDITING phrase, you cannot use the CLEAR ALL, DOWN, or UP statements on the frame being edited.
- If you hide and redisplay a frame while you are in an EDITING block, the AVM might not redisplay it in the same location unless you specifically name the row and column of the frame. This could cause problems because the EDITING block does not recognize the new location, and attempts to update the fields at the old frame location.
- The EDITING phrase activates only for input from a terminal. If your input comes from an operating system file (set with the INPUT FROM statement), the EDITING phrase has no effect.
- The EDITING phrase is incompatible with event-driven programming. An EDITING block might interfere with other event handling statements.
- For more information on EDITING blocks and other ways of monitoring keystrokes, see OpenEdge Development: Programming Interfaces.
See alsoEND statement, PROMPT-FOR statement, READKEY statement, SET statement, UPDATE statement
OpenEdge Release 10.2B
|