Widget-pool: what is, and the advantage to use it?

Posted by Admin on 30-Jul-2008 02:43

OK about:

Widget Reference

Widgets are handle-based objects that provide visual representations of data and other elements of a user interface. Like all handle-based objects, widgets support attributes and methods to access and manipulate widget state and behavior. Widgets also support events to which an application can respond to interact with the state and behavior of each widget.

-

But a Widget-pool what is?

How i can define/use it?

All Replies

Posted by Admin on 30-Jul-2008 04:03

CREATE WIDGET-POOL statement

Creates a named or unnamed widget pool in which to contain most dynamic widgets and other handle-based objects created during an ABL session.

Note: Does not apply to SpeedScript programming.

-

A user try to explain me, and i understand that a W-P is collection of handle, generaly User Interface Object not only GUI, usefull for release stack memory at the end of the interface use.

A kind of Java garbage collection, or similar.

Posted by Thomas Mercer-Hursh on 30-Jul-2008 10:48

Yes, like garbage collection where you have to take out your own garbage ...

Posted by Admin on 31-Jul-2008 05:04

I do an experiment for auto-update a frame's title, but i can't, so i try to use WIDGET-POOL, but is probable the incompatibility STATEMENT.

DEF VAR vcStringa AS CHAR INIT "Questa è la stringa di inizializzazione" FORMAT "X(40)" NO-UNDO.

DEF VAR vcFrameStampa AS CHAR NO-UNDO.

DEF VAR vcFrameTitolo AS CHAR NO-UNDO.

DEF VAR i AS INT NO-UNDO.

DO i=0 TO 5

:

CREATE WIDGET-POOL "new-WP" PERSISTENT.

vcFrameStampa = SUBSTITUTE ("fStampa&1", i).

vcFrameTitolo = SUBSTITUTE ("Procedura di stampa &1", i).

DEFINE FRAME vcFrameStampa WITH CENTERED ROW 3 TITLE vcFrameTitolo IN WIDGET-POOL "new-WP".

DISPLAY vcStringa LABEL "Stampa"

i LABEL "indice"

vcFrameTitolo FORMAT "X(40)"

vcFrameStampa FORMAT "X(40)"

WITH FRAME vcFrameStampa.

PAUSE.

DELETE WIDGET-POOL "new-WP".

END.

Posted by Thomas Mercer-Hursh on 31-Jul-2008 10:55

I'm guessing that this is the same code as in the other thread with widget-pool added and that the actual problem is with the other code. I don't think widget pool has anything to do with the issue ... whatever that might be ... since widget pool is just a housekeeping tool. It is not going to change the behavior of the code.

This thread is closed