Progress
Programming
Handbook
Persistent Procedure Context and Shared Objects
While the context of a persistent procedure remains available to your application, there are certain capabilities that persistent procedures do not allow:
- Static dialog boxes — You cannot maintain static dialog boxes in a persistent procedure. Any static dialog boxes that a persistent procedure defines go out of scope when the instantiating RUN statement returns to the calling external procedure. For more information, see Windows."
- Shared streams or frame, browse, and menu widgets — You cannot create or access shared streams or shared frame, browse, or menu widgets in a persistent procedure. If you do, the instantiating RUN statement does not create the procedure context and returns with the ERROR condition.
- DISABLE TRIGGERS Statement — You cannot execute the DISABLE TRIGGERS statement anywhere while executing code in a persistent procedure. Otherwise, Progress raises the ERROR condition at that point.
All other widgets and shared objects are allowed in a persistent procedure.
Scoped Object Sharing
In persistent procedures, scoped object sharing works differently than in non-persistent procedures. When a persistent procedure references a shared object, the scoped shared object stays in scope as long as the persistent procedure remains in scope. In other words, a shared object can go out of scope only when no persistent procedure remains that references it. For more information on scoped shared objects, see the "External Procedures" section.
Persistent Shared Objects and the Call Stack
Note that after a persistent procedure is created, it no longer appears on the procedure call stack. Only its triggers and internal procedures go on the call stack when they execute other procedures.
Normally Progress resolves scoped shared objects by looking for them on the call stack. However, if the trigger or internal procedure of a persistent procedure calls an external procedure that references scoped shared objects, Progress resolves these objects by looking for them in the context of the persistent procedure as well as on the call stack. For more information on the procedure call stack, see the "External Procedures" section.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |