skip to main content

Working With Controls : Creating a control : Embedded Procedures

Embedded Procedures
Embedded Procedures have been implemented to make programming even simpler. It is a way to attach a procedure, a paragraph, or a section to one or more controls and have them activated before the control activation, after the control activation, and when a function key is pressed.
Every Screen Section item, regardless of whether it is a group or a single control, can handle up to three different Embedded Procedures. If an Embedded Procedure is assigned to a group, it is inherited by all the groups or controls that it contains, unless they have their own embedded procedure set.
There are three kinds of Embedded Procedure:
When BEFORE PROCEDURE is declared for the control, the paragraph(s) procedure-1 (thru procedure-2) are executed when the control gets focus, just before accepting user input.
When AFTER PROCEDURE is declared for the control, the paragraph(s) procedure-3 (thru procedure-4) are executed when the control looses focus or when the ACCEPT terminates, just after accepting user input.
When EXCEPTION PROCEDURE is declared for the control, the paragraph(s) procedure-5 (thru procedure-6) are executed each time the ACCEPT of user input is interrupted by an exception (for example when the user presses a function key).
Within Embedded Procedures, the SCREEN CONTROL special registry can be used to monitor and change the focus.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left