Consultor Eletrônico



Kbase P28368: What is CREATE WIDGET-POOL for in Webspeed and should I clos
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   25/11/2003
Status: Unverified

GOAL:

What is CREATE WIDGET-POOL for in Webspeed and should I close it?

FACT(s) (Environment):

WebSpeed 3.x

FACT(s) (Environment):

Progress 9.x

FIX:

<B>What is Create Widget-Pool for;</B>

Progress automatically creates a persistent unnamed widget pool at the start of each session. Most applications use only the session widget pool.

Unnamed widget pools cannot be persistent, except the session widget pool, which is created by Progress.

Persistent widget pools remain allocated until they are explicitly deleted (with the DELETE WIDGET-POOL statement) or until the end of the Progress session that created them.

All named widget pools are globally scoped. While a named widget pool is allocated, any procedure within the same process can access that widget pool. The name of a widget pool must be unique among all widget pools for the process. If you try to create a widget pool with the same name as an existing pool, Progress raises the ERROR condition.

If a recursive procedure creates an unnamed widget pool, each iteration of that procedure creates a separate pool. If a recursive routine creates a named widget pool, you must ensure that only one iteration creates the pool (where all iterations can share it) or use a different name in each iteration (where each creates and uses its own pool).

When you create an unnamed widget pool, it automatically becomes the default widget pool. This means that each subsequent dynamically created widget is placed in that pool unless you specifically assign it to another pool. The unnamed pool you create remains the default widget pool until it is deleted or you create another unnamed widget pool.

You might want to create a new, unnamed widget pool just before invoking a new procedure and then delete that pool when the procedure returns. This ensures that any dynamic widgets created by that procedure in the default pool are deleted immediately.

<B>Should you DELETE WIDGET-POOL;</B>

When you delete a widget pool, all widgets in that pool are automatically deleted.

If you do not delete a non-persistent widget pool, it is deleted when the procedure that created it ends. If you do not delete a persistent widget pool, it is deleted when the session ends.

All named widget pools are globally scoped. While a named widget pool is allocated, any procedure within the same process can access that widget pool. If you try to delete a named widget pool that does not exist, Progress raises the ERROR condition.

Syntax Sample;

CREATE WIDGET-POOL.
RUN xyz.p.
DELETE WIDGET-POOL.