Home Segments Index Top Previous Next

811: Mainline

Now, you can create a value holder and a ViewSubclass instance, and can tie them together:

Workspace
H := ValueHolder new. 
V := ViewSubclass new. 
V model: H. 

Then, setting the value instance variable in the value holder causes an update: message to be sent to the view:

Workspace
H value: 1. 
Transcript 
Sample viewer receiving #value update message 
Value, determined in viewer, is 1