ABL organizes forms and windows into three different chains of objects in a session—the object, form, and window chains. Each form or window that you create appears directly on one or two of these chains depending on the kind of object it is. These chains allow ABL to maintain relationships among different kinds of objects and to search for and manage different types of objects, depending on your application requirements.
The following figure shows how ABL organizes forms and windows in session chains.
Figure 17. ABL session object, form, and window chains
This figure shows the three chains of objects that ABL builds for forms and windows:
Object chain — Contains Progress.Lang.Object references to all class-based objects that you create in a session, including ABL user-defined and .NET objects. This includes both ABL-derived .NET form objects and pure .NET form objects you might create, such as FormA and FormB in the above figure. As shown in the above figure, the object chain is anchored to the SESSION system handle by the FIRST-OBJECT attribute at one end and by the LAST-OBJECT attribute (not shown) at the other end. All class instances that you create, including .NET objects, are then linked to each other on the object chain in order of creation (until deleted or garbage collected), starting with SESSION:FIRST-OBJECT, using the NEXT-SIBLING property, and are linked back from SESSION:LAST-OBJECT using the PREV-SIBLING property in reverse order of creation.
Form chain — Contains object references to two types of .NET forms, both of which implement the OpenEdge .NET interface, Progress.Windows.IForm. This interface defines common properties that allow an implementing .NET form object to interact more easily with other form objects, and with ABL windows, in an ABL session. As shown in the above figure, ABL anchors the form chain to the SESSION system handle by the FIRST-FORM attribute at one end and by the LAST-FORM attribute (not shown) at the other end. The data type of these attributes is defined as Progress.Windows.IForm, and two properties that this interface defines are NextForm and PrevForm, which allow different types of forms that implement the interface to be linked together in the form chain. The two basic form classes that can appear in the form chain include:
Progress.Windows.Form — An OpenEdge .NET form class that inherits from System.Windows.Forms.Form, including any of its ABL and .NET subclasses. (OpenEdge provides one .NET subclass, Progress.Windows.MDIChildForm.) ABL automatically creates and associates with each Progress.Windows.Form object that you instantiate (see FormA in the above figure) a unique window widget referred to as a shadow window (see ShadowWindowA in the above figure). Note that a shadow window never appears on the window chain (described in the following bullet), and you can only access it through its associated form using the ProWinHandle property (defined by Progress.Windows.IForm). For more information on shadow windows and their relationship to form objects, see Shadow windows.
Progress.Windows.FormProxy — An OpenEdge .NET form class that inherits directly from System.Object. ABL automatically creates and associates a unique Progress.Windows.FormProxy object (see FormProxyX in the above figure) with every ABL window that you create in a session (see WindowX in the above figure). Note that a FormProxy object never appears on the object chain (its NEXT-SIBLING and PREV-SIBLING properties always return the Unknown value (?)), and you can reference its associated window using the ProWinHandle property (defined by Progress.Windows.IForm). For more information on FormProxy objects and their relationship to ABL windows, see FormProxy objects.
Note: In non-GUI ABL sessions, there is no form chain; any Progress.Windows.IForm objects that you instantiate appear only on the object chain. However, note that creating such objects is not typical in a non-GUI session.
Window chain — The standard ABL window chain available in all ABL client applications, which contains the handles to all ABL windows created in the session, such as WindowX in the above figure. ABL anchors the window chain to the SESSION system handle by the FIRST-CHILD attribute at one end and by the LAST-CHILD attribute (not shown) at the other end, with all window widgets linked to each other in the chain using the NEXT-SIBLING and PREV-SIBLNG attributes. As noted in the previous bullet, the window chain in an ABL session accessing .NET forms does not contain shadow windows.