[Migrated content. Thread originally posted on 08 January 2010]
We are developing an application that allows a user to open a second screen form our main screen that will display a website. The second screen is started in a Thread and is set to independent, Modeless, Link To Thread with a Browser showing the address selected. The second screen then goes into a Perform loop accepting messages from any thread. Below is the code in the second screen that we are attempting to use (ws-new-address is being passed with messages from the 1st screen with the new address to show).PERFORM WITH TEST AFTER UNTIL WS-X = "X"
ACCEPT PCR-VIEWER-SCREEN ALLOWING MESSAGES FROM ANY THREAD
IF KEY-STATUS = 95
RECEIVE WS-NEW-ADDRESS FROM ANY THREAD
IF WS-NEW-ADDRESS(1:12) = "close me now"
MOVE "X" TO WS-X
ELSE
MODIFY WB-1 VALUE = WS-NEW-ADDRESS
MODIFY EF-ADDRESS VALUE = WS-NEW-ADDRESS
END-IF
INITIALIZE KEY-STATUS
END-IF
END-PERFORM.
MOVE "SCREEN CLOSED" TO PASSED-ADDRESS.
SET EXIT-PUSHED TO TRUE.
DESTROY PCR-VIEWER-Handle.
INITIALIZE Key-Status.
Exit Program.
The issue that we are having is passing information back and forth in the thread. We allow the user to select a different address and that is passed using Messages to the second screen to display the new address. Code below shows the logic we are using to SEND the new address:
SEND WS-NEW-ADDRESS TO THREAD IE-THREAD
WAIT FOR IE-THREAD
We continue to try options but seem to get a "DEADLOCK in message system" error at every turn. This usually happens when we try to pass a new address to the second screen. The first display of the screen with the original address works fine.
Thanks for any help...WE NEED ALL WE CAN GET!!!!!!



