Release 10.1A: OpenEdge Development:
Progress 4GL Handbook

> ## Realizing and derealizing objects

> When you define an object, Progress creates an internal data structure associated with that object. Before the object can be displayed, the window system must also create a data structure for the object. When this second data structure has been created, then the object is realized.

> You can modify some object attributes at any time. Others are initially modifiable, but become fixed once the object is realized. In addition, some attributes must be set before realization takes place. For this reason, it is important to have an understanding of when objects are realized.

> In general, an object is realized when the application needs to make it visible on the screen. Therefore, field-level objects, buttons, and the like are typically realized when their containers are realized or made visible, and conversely, a container object is realized when a statement forces any of its contained objects to be realized or made visible.

> In addition, an object is realized if a statement references any method of the object because methods operate on the realized instance object. Also, some attribute values, such as those that reference an object’s size, can only be determined if the object has been realized, so a reference to any of those attributes forces the object to be realized if it is not already. Examples of this are the `MODIFIED` attribute of an editor, which is true if the text in the editor has been changed since it was initialized, and the `MAX-HEIGHT` or `MAX-WIDTH` attributes of a frame which cannot be calculated without realizing the frame.

> A static object is derealized, or destroyed, when it goes out of scope. Generally, the scope of a defined object is the procedure in which it’s defined. Field-level objects are derealized when their frame is derealized. In turn, a frame is derealized when its containing window is deleted.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095