TickIndicatorMorph colors

Lyndon Tremblay humasect at shaw.ca
Sun Dec 12 01:30:19 UTC 2004


I was using this morph for the status of a process. I initially thought that
the color used from Etoys (blue for active, red for paused) were part of the
TickIndicatorMorph behavior. I found it all in
ScriptStatusControl>>mouseUpTick:onItem: - and I wonder now whether the
change of color could be part of the isTicking: message. Looking at the
method makes it clear:

mouseUpTick: evt onItem: aMorph
     self removeAlarm: #offerTickingMenu:.
     aMorph color: (Color r: 0.767 g: 0.767 b: 1.0).
     (scriptInstantiation status == #ticking) ifTrue:[
          scriptInstantiation status: #paused.
          aMorph color: (Color r: 1.0 g: 0.774 b: 0.774).
          aMorph isTicking: false.
       ] ifFalse:[
          scriptInstantiation status: #ticking.
          aMorph color: (Color r: 0.767 g: 0.767 b: 1.0).
          aMorph isTicking: true.
     ].
     scriptInstantiation updateAllStatusMorphs.

These are always TickIndicatorMorphs.

-lyndon




More information about the Squeak-dev mailing list