Kbase P92107: Window doesn't launch
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/20/2004 |
|
Status: Unverified
SYMPTOM(s):
Window doesn't launch
Procedures are left running after closing window
One instance of a window is allowed
Windows have a Parent, Child, Grand Child setup
When the parent window is closed a message asking if you want to close the child window is shown
After answering yes to the first message, a second warning is produced but all windows have already disappeared
Answer no to the second message
CAUSE:
Answering no to the second message means that the Child window's procedure is left running because the grand child's procedure is still running. When you try to run a new instance of the child window, it see the procedure running and assumes the window is open.
FIX:
Change the destoryobject procedure of ry/app/rydynwindp.p look like this:
DEFINE VARIABLE cButton AS CHARACTER NO-UNDO.
DEFINE VARIABLE hContainerSource AS HANDLE NO-UNDO. /* New variable here */
/* HCK: If close window - give chance to abort this if windows open. If a property
has been set not to prompt, then don't. This can be used in cases (like the
container builder) where windows are hidden instead of closed to improve
performance. All child windows will still be closed, but the prompt will
not be made. The code has been moved from the WINDOW-CLOSE trigger to here
to ensure it fires reliably - when the container is closed using the toolbar,
or the 'X' at the top-right of a window
*/
/* New code start */
{get ContainerSource hContainerSource}.
IF SOURCE-PROCEDURE <> hContainerSource AND
/* New code end */
/* IF */ /*Code commented here */ {fnarg getUserProperty '"promptForChildWindows"'} NE "NO":U AND
{fn childWindowsOpen} THEN
DO:
RUN showMessages IN gshSessionManager (INPUT {aferrortxt.i 'RY' '20'},
INPUT "QUE":U,
INPUT "&Yes,&No":U,
INPUT "&YES":U,
INPUT "&No":U,
INPUT "Close Window",
INPUT YES,
INPUT ?,
OUTPUT cButton).
IF cButton EQ "&No":U OR cButton EQ "No":U THEN
RETURN ERROR "ADM-ERROR":U.
END. /* child windows are open. */
RUN SUPER NO-ERROR.
IF ERROR-STATUS:ERROR OR RETURN-VALUE = "ADM-ERROR":U THEN
RETURN ERROR "ADM-ERROR":U.