Squeak Class Documentation category index | class index  
 
LedMorph
  category: Morphic-Games
  superclass: Morph
  subclasses: LedTimerMorph

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.

instance methods
  accessing
  chars
chars:
color:
digits
digits:
flash
flash:
highlighted:
scrollLoop
scrollLoop:
string
string:
stringToLed
value
value:

  change reporting
  layoutChanged

  drawing
  drawOn:

  initialization
  initialize
scrollInit

  stepping
  step
stepTime

class methods
  as yet unclassified
  includeInNewMorphMenu

instance methods
  accessing top  
 

chars


 

chars:


 

color:

Set the receiver's color. Directly set the color if appropriate, else go by way of fillStyle


 

digits


 

digits:


 

flash

Do nothing.


 

flash:


 

highlighted:


 

scrollLoop


 

scrollLoop:


 

string


 

string:


 

stringToLed


 

value


 

value:


  change reporting top  
 

layoutChanged


  drawing top  
 

drawOn:


  initialization top  
 

initialize


 

scrollInit


  stepping top  
 

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.


class methods
  as yet unclassified top  
 

includeInNewMorphMenu

Return true for all classes that can be instantiated from the menu