Home Segments Index Top Previous Next

847: Mainline

The purpose of the meterValueHolder instance variable is to provide a place for the value holder that is to hold the value shown on the meter. As explained in Segment 831, the initial value of that instance variable is established by the meterValueHolder getter. That initial value is an initialized value holder:

MeterDemonstration method definition • instance 
  ^ meterValueHolder isNil 
      ifTrue: [meterValueHolder := 5 asValue] 
      ifFalse: [meterValueHolder]