Question ToolBox

Hello,
I'm actually running on progress 10.2B08 and planning on migrating on 11.7.
That aside, I have created a .p file that I used as toolbox by running it in persistent and fetched it when running an app to see if it's running and if it's running, using a local handle to use it.
I would like to know if it's a good way to do it, or if there is other way .

Best regards,

BobyIsProgress
 

Osborne

Active Member
What you have done sounds fine and a possible improvement is to use Super Procedures:


Your toolbox program could be added as follows:

Code:
SESSION:ADD-SUPER-PROCEDURE(THIS-PROCEDURE).

or

Code:
RUN prog1 PERSISTENT SET hProg.
SESSION:ADD-SUPER-PROCEDURE(hProg).

By making available to the whole session programs that require the toolbox do not have to have code to get a handle to it as any internal procedures or dynamic functions in the toolbox can be called directly as if they were actually in the program making the call.

Another option is to use a singleton class:


If you do not want anything static running look at the solution outlined by Tamhas:

 
Hello Osborne,
Thank you for your help and advice.
I manage to create a class in OE10.2B without and use it in a procedure without adding it to the assembli file. I was convince that it was mandatory.
So I will advance on this path take my flight on POO
 
Top