Consultor Eletrônico



Kbase 15904: Running basic windows from SmartWindows and consequences
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Running basic windows from SmartWindows and consequences

INTRODUCTION
============
This knowledgebase entry discusses problems that can occur
when running basic windows from SmartObject applications and
how to resolve them.

PROBLEMS THAT CAN OCCUR
=======================
If basic windows are run from a SmartObject application the
user could minimize that window and then quit the SmartOjbect
application leaving that window running. When that basic
window is then closed the following error occurs:

Invalid widget handle used in WAIT-FOR statement. WAIT-FOR
terminated. (4122)

If that basic window is being run non-persistently then there
will probably be stacked wait-fors which could cause many
problems (refer to knowledgebase entry 15261 - Stacked WAIT-FOR
statements in a window, frame or dialog box).

WAYS TO RESOLVE THE PROBLEMS
============================
If the basic window must be called non-persistenly then you
must handle the stacked WAIT-FOR statements by hiding the
SmartObject application before running the basic window so that
users cannot bring focus back to the SmartObject application
while the WAIT-FOR is on the basic window. This should be done
by hiding the SmartObject application before the run of the
basic window and viewing the SmartObject application again when
the user has dismissed the basic window.

ON CHOOSE OF btn-basicwin DO:
RUN dispatch IN THIS-PROCEDURE ('hide':U).
RUN basicwindow.w.
RUN dispatch IN THIS-PROCEDURE ('view':U).
END.

If the basic window can be called persistently then it should
be included on a page of the SmartObject application and run
with select-page or run with init-object. These two methods set
up container links to the SmartObject application which will
ensure that the basic window will be destroyed when the SmartObject
application is closed. Refer to knowledgebase entry 15813 -
How to run SmartWindow from other SmartWindows.

If one of the above two methods which set up container links
cannot be used then the basic window can be run persistently but
you must write a local procedure to destroy the basic window
when the SmartObject application is closed.

REFERENCES TO WRITTEN DOCUMENTATION
===================================
Progress Version 8 User Interface Builder Developer's Guide


Progress Software Technical Support Note # 15904