Consultor Eletrônico



Kbase 33606: ADM2. How to run a child Windows from his parents using a SmartContainer?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Solution ID: P3606

GOAL:

ADM2. How to run a child Windows from his parents using a SmartContainer?

FACT(s) (Environment):

Progress 9.1x

CAUSE:

You may experience that after having run a Window from another window, which also call a child window (in example Window A call from a button Window B that call from a button Window C), that if you close the Second window (Window B) you cannot reinstanciate the parent window after it has been closed.

In other terms:

A run B.
B run C.
B is closed by the user then B cannot be ran again from A.

This is not a bug, this is expecter behavior.

You will have to use SmartContainer for this purpose.

FIX:

You will have to use a SmartContainer Object in way to achieve this.

The correct way to do it assuming the example above:
A run B.
B run C.

In Window A you have a button where you run B.
In Window B you have a button where you run C.

1) In Windows A the button should be in page 0.

2) Change Window A to page 1.

3) Add a SmartContainer in Window A Page 1.
4) SmartContainer should reference the child window B.W.
5) Return to page 0 in window A.
6) In the Choose Trigger of button in Window A put the following code.

RUN selectPage(INPUT 1).

Instead of:

RUN B.W.

Where 1 is the page 1 where the SmartContainer has been placed.

7) Save your Window A and run it.

The above described process is also valid if you run the Child-Window from his parent form a menu_item. In that case you will put the code RUN selectPage(INPUT 1), from the choose trigger of the menu_item.