Consultor Eletrônico



Kbase P109614: Closing a window deletes a menu in another window.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/5/2005
Status: Unverified

SYMPTOM(s):

Closing a window deletes a menu in another window.

Closing a container seems to delete objects in other windows.

Dynamic objects are deleted from some containers when closing other windows.

After creating all windows a function key is pressed to re-create a dynamic menu in one of the windows.

CAUSE:


This is expected behavior and is caused by the order of object creation and the widget pools that the objects are created in.

In each AppBuilder generated window there is a statement added by the AppBuilder to create a new unnamed widget pool. This can be seen with "Code Preview" ("CREATE WIDGET-POOL") at the top of the code listing. After each creation of the widget pool, the new widget pool becomes the default for all new objects until a new widget pool is created. So when each window initializes, all the objects are created in its new widget pool.

After all windows are initialized, if one of the windows is selected and a dynamic object created in it, by default this new object will be created in the Widget pool of the window that was last initialized. Subsequently if this last window is closed then its widget pool and all its contained objects will be deleted, including any new dynamic objects created in other windows. This will look as if closing one window deletes objects in a totally unrelated window.

FIX:

After all windows have been initialized, create any further dynamic widgets in uniquely named widget pools. This could be done with both persistent and non-persistent widget pools, but prevents other windows affecting dynamic widgets created some time after the window was originally initialized.