Consultor Eletrônico



Kbase 18356: How To View A Hidden External Window In Apptivity 2.1 And 3.x
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

GOAL:

How to view a hidden external window in Apptivity 2.1 and 3.x

FACT(s) (Environment):

Apptivity 2.x
Apptivity 3.x

SYMPTOM(s):

In earlier versions of Apptivity (1.0 and 2.0) it was possible to view a hidden external window simply using the show() method.  In 2.1 and above if you try to show the hidden window you will get this error:


  Error: Window cannot be shown after being closed.

This can be resolved by setting the window owner for the external
window.

FIX:

In Apptivity 2.1 and later versions, in order to be able to control an external window from another window/form you have to set the window owner explicitly:


i_Window2.setOwner(this);

This should be done in the first window before the call to show() for the second external window (that is, window2).  The reason is this; if on hide() we do not destroy the external window (in the case when the user clicks on right-top "x" button), the window reference is lost and the window becomes unusable, meanwhile taking system resources.