Home Segments Index Top Previous Next

707: Mainline

Next, you add the setMin:, setMax: and setTitle: setters to the initializeMeter: callback method. You also send the event: message, with an argument, #display. The event: message tells the meter pane to act as though the event, #display, has occurred:

CalorieViewManager method definition • instance 
initializeMeter: theMeter 
  theMeter setMin: 0;  
           setMax: 100;  
           setTitle: 'Calorie Meter';  
           event: #display. 

From the definition of createViews in Segment 705, you know that the response to the event: message, with a #display argument, is to send the callDrawMeter: message to the view manager, thus drawing the meter.