Home Segments Index Top Previous Next

Chapter 40:

How To Use VisualWork's Value Holders and Aspect Adapters

The Model class has many subclasses. Of these, the two that you should learn about first are the ValueHolder and AspectAdapter classes, both of which are explained in this chapter.

VisualWorks widgets generally interact with one another and with application instances via value holders and aspect adapters, so widgets can use just two messages, value and value:, to get and set values. Such uniformity enables widget writers to develop general-purpose widgets that do not depend on application details.

In this chapter's illustrations, you see various objects manually assigned to global variables. Such manual assignment to global variables is for illustration only; ordinarily, a GUI builder attaches models, viewers, and controllers to one another using instance variables, as described in Chapter••missing reference••.