Home Segments Index Top Previous Next

810: Mainline

Suppose, for example, that you slightly redefine the update: method, defined previously in Segment 802, such that it works with a value holder. You replace the getX getter with the value getter:

ViewSubclass class definition 
DependentPart subclass: #ViewSubclass 
  instanceVariableNames: '' 
  classVariableNames: '' 
  poolDictionaries: '' 
  category: 'Experiment' 
ViewSubclass method definition • instance 
update: aspect 
  aspect = #value 
    ifTrue: 
      [Transcript show: 
        'Sample viewer receiving #value update message'; cr. 
       Transcript show:  
        'Value, determined in viewer, is ' 
        , self model value printString; cr.]