skip to main content
OpenEdge Development: Basic Development Tools
Procedure Editor Integration Hooks : Usage
 
Usage
The following comments address Procedure Editor usage issues:
*BEFORE-CLOSE and CLOSE — Technically, p_other should be unknown (?) after a file closes; however, this parameter still shows the last available file name for the procedure file. Unknown (?) appears only if there is no filename.
*BEFORE-RUN, RUN, BEFORE-DEBUG, DEBUG, BEFORE-CHECK-SYNTAX, and CHECK-SYNTAX — These all use the last specified filename as p_other. The actual file being run or checked is a temporary file with a name like p01928384.ped. This name is not used.
*If the user tries to close a buffer, then the Procedure Editor first prompts the user to save. The entire save operation events fire before the call to BEFORE-CLOSE.
*NEW is called after a buffer is created. You see the buffer before the NEW event is called. All events are called after the event has finished.
*When you control the handle for the Procedure Editor window, you can manipulate the display of the window. For example, you can add a menu option.
The scenario shown in Table 5 applies to the Procedure Editor.
 
Table 5: Usage scenario for the Procedure Editor
Action
p_event
p_context
p_other
Comments
Creating, saving, and running the file
FileNew
NEW
56788
?
Filename unknown.
FileSave
BEFORE-SAVE
56788
c:\9\window-1.w
SAVE
56788
c:\9\window-1.w
Running the file
BEFORE-RUN
56788
c:\9\window-1.w
Run uses last filename.
RUN
56788
c:\9\window-1.w
FileSave As
BEFORE-SAVE
56788
c:\9\my-file.w
Same context, new name.
SAVE
56788
c:\9\my-file.w
Closing the file with modifications
Procedure Editor prompts user to save changes
BEFORE-SAVE
56788
c:\9\my-file.w
Closing a file can cause the Procedure Editor to prompt the user to save a file.
SAVE
56788
c:\9\my-file.w
Procedure Editor closes the file
BEFORE-CLOSE
56788
c:\9\my-file.w
CLOSE
56788
c:\9\my-file.w
Opening the file
FileOpen
BEFORE‑OPEN
?
c:\9\my-file.w
Occurs after the Open dialog box. Before‑open can be cancelled.
OPEN
46647
c:\9\my-file.w
Observe the new context number.
Closing the file without modifications
FileClose
BEFORE-CLOSE
46647
c:\9\my-file.w
CLOSE