Trigger a WAIT-FOR in code with APPLY "..." TO

Posted by Lieven Cardoen on 30-Nov-2012 02:29

I'm having a problem with stacked WAIT-FOR 's. First of all, our 'classic' code (procedures with frames) are all embedded in a class extending from Progress.Windows.WindowContainer. (these in return are embedded in a Windows Form!)

If I have two WAIT-FOR 's and I am trying to close them in code (last in first out) next thing happens:

Let's say procedure A first executes a WAIT-FOR and then procedure B executes a WAIT-FOR.

Now, in code, I first do an APPLY "CLOSE" to Procedure B and then an APPLY "CLOSE" to Procedure A.

What happens if I put some logs after the WAIT-FOR's is that only after all code has been executed, the APPLY "CLOSE" to Procedure B is triggered. The APPLY "CLOSE" to Procedure 1 is never triggered.

Next is my log with some explanation:

[12/11/29@16:36:55.830+0100] P-008772 T-008380 1 4GL APPL           LCA apply U1 to q1i_cplt (PROCEDURE B)
[12/11/29@16:36:55.843+0100] P-008772 T-008380 1 4GL APPL           LCA MipsWindowContainer::Dtor:  Complaint query  (Progress.Windows.WindowContainer)
[12/11/29@16:36:59.483+0100] P-008772 T-008380 1 4GL APPL           LCA apply U1 to br_3580 (PROCEDURE A)
[12/11/29@16:37:00.092+0100] P-008772 T-008380 1 4GL APPL           LCA MipsWindowContainer::Dtor: Contact (Progress.Windows.WindowContainer)
[12/11/29@16:37:00.093+0100] P-008772 T-008380 1 4GL APPL           LCA gp_dlg::broken wait-for q1i_cplt (now WAIT-FOR is triggered)
---- WAIT-FOR of br_3580 is never triggered, so this procedure still lives... while is should be deleted...

As you can see, only after both applies have been executed, and only after both WindowContainers have been destructed, the WAIT-FOR of PROCEDURE B is triggered. The WAIT-FOR of PROCEDURE A is never triggered...

I know it's hard to explain. I tried to reproduce it with a simple example using only procedures but that worked as it should work. So, with only procedures, everything works fine. But embedded in .NET the WAIT-FOR is only triggered at the end of the code...

Is there a way to force the WAIT-FOR to be triggered immediately. Now it looks as if the event is postponed until all code has finished.

All Replies

Posted by Admin on 18-Dec-2012 12:50

deleted - wrong thread

This thread is closed