View hierarchies

A view can contain one or more other views, forming a hierarchy of views. When one view contains another view, they are said to have a parent-child relationship: the containing view is the parent and the contained view is a child of the parent.


Figure 19 illustrates the relationship between a view hierarchy and the way the View System displays it. The left side of the figure shows a view hierarchy containing four views. View A has two children, view B and view C. View B has a single child, view D. The right side of the figure shows how the view hierarchy might appear on a display device.

A view becomes the child of another view when the parent adopts (takes control of) the child. This means that the parent view does not merely contain the child, but until it orphans (releases control of) the child, the parent owns the child.

Maintaining strict clarity over ownership not only makes code less error-prone, but it prevents lexical cycles, situations in which a parent and a child refer to one another in an unresolvable cycle.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker