Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Application Development with PAS for OpenEdge : Programming the Progress Application Server for OpenEdge : Programming for Open Client applications : Using code editors
 
Using code editors
For any persistent procedures that you write by hand, you can also use the ProtoGen utility to generate include files from any super procedure prototypes you might need. However, you might prefer or need to code these prototypes by hand, especially in a character environment.
To code the necessary prototypes, edit a persistent procedure that requires them and include a PROCEDURE statement for each internal procedure prototype and a FUNCTION statement for each user-defined function prototype using the IN SUPER option in each case. For internal procedures, you must also follow the PROCEDURE statement with any DEFINE PARAMETER statements to specify the parameters for the internal procedure and terminate the procedure block with an END statement, like a standard procedure block. For user-defined functions, you can include the parameter and return value prototypes within the FUNCTION statement itself. For example:
PROCEDURE addMessage IN SUPER:
DEFINE INPUT PARAMETER pcText AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER pcField AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER pcTable AS CHARACTER NO-UNDO.
END PROCEDURE.

FUNCTION setPosition RETURNS LOGICAL
(INPUT pfRow AS DECIMAL,
INPUT pfCol AS DECIMAL)
IN SUPER.
This example defines prototypes for an internal procedure, addMessage, and a user-defined function, setPosition, that are defined in some super procedure. Note that there is no indication of what super procedure these prototypes refer to. For the Open Client Toolkit, only the prototypes are required; the IN SUPER option only tells OpenEdge that the procedure or function definition lies elsewhere. As long as the toolkit knows the prototypes, it can generate the correct proxy object definitions. OpenEdge then locates the appropriate code to execute at run time for each super procedure prototype that the Open Client application references.
Again, remember to compile and generate the r-code for each persistent procedure before making it available for access by the Open Client Toolkit.