LED

LedCharacterMorph
char 36 is SPACE
char
char:
defaultColor
answer the default color/fill style for the receiver
drawOn:
drawOnFills:
highlighted
highlighted:
includeInNewMorphMenu
initialize
initialize the state of the receiver
LedDigitMorph
I am a 7-segment LED that can display a decimal digit
defaultColor
answer the default color/fill style for the receiver
digit
digit:
drawOn:
drawOnFills:
highlighted
highlighted:
includeInNewMorphMenu
initialize
initialize the state of the receiver
LedMorph
I am a collection of LED digits that can display a decimal value. The display can be set to flash by sending flash: true.
LedMorph can now display characters:
LedMorph new string:'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; openInWorld
Lowercase letters will be converted to Uppercase. Carachters not in the examle
above will be shown as SPACE which is char 36 in LedCharacterMorph.
LedMorph new chars: 10; string:' I must get a life';flash:true;scrollLoop:true; openInWorld
The number of letters is set by chars.
If chars is not specified it will be set to the string size.
When the string size is bigger than chars
the string will scroll across the led. WOW!
scrollLoop let's you set the scrolling to start over once its finished.
Enjoy.
chars
chars:
color:
set the receiver's color and the submorphs color
defaultColor
answer the default color/fill style for the receiver
digits
digits:
drawOn:
flash
Do nothing.
flash:
highlighted:
includeInNewMorphMenu
initialize
initialize the state of the receiver
layoutChanged
Fixed to always flush layout cache - finally tracked down
layout anomalies due to cached extents in layout
policies not being flushed, the previous (incorrect) assumption being
that it did not matter if layout was to be recomputed (fullBounds being nil).
Recomputing of the layout apparently does not flush so must be done here.
scrollInit
scrollLoop
scrollLoop:
step
Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message. The generic version dispatches control to the player, if any. The nasty circumlocation about owner's transformation is necessitated by the flexing problem that the player remains in the properties dictionary both of the flex and the real morph. In the current architecture, only the top renderer's pointer to the player should actually be honored for the purpose of firing.
stepTime
Answer the desired time between steps in milliseconds. This default implementation requests that the 'step' method be called once every second.
string
string:
stringToLed
value
value:
LedTimerMorph
A LedTimerMorph is xxxxxxxxx.
Instance Variables
counting: <Object>
startSeconds: <Object>
counting
- xxxxx
startSeconds
- xxxxx
continue
initialize
initialize the state of the receiver
pause
reset
resume
start
Start running my script. For ordinary morphs, this means start stepping.
step
Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message. The generic version dispatches control to the player, if any. The nasty circumlocation about owner's transformation is necessitated by the flexing problem that the player remains in the properties dictionary both of the flex and the real morph. In the current architecture, only the top renderer's pointer to the player should actually be honored for the purpose of firing.
stepTime
Answer the desired time between steps in milliseconds. This default implementation requests that the 'step' method be called once every second.
stop
Stop running my script. For ordinary morphs, this means stop stepping.
updateTime