Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
100 calculi
Last updated at 9:27 pm UTC on 7 August 2020
calculus (Latin) = “a pebble or stone used for counting”
Plural is 'calculi'. https://en.wiktionary.org/wiki/calculus#Latin


 | container |
 
  counterSize := 25.
  containerSize := counterSize * 10 + (10*  2 * 2 "cellInset").
  container := Morph new color: Color white.
  container width: containerSize.
  container height: containerSize.
  container cellInset: 2.
 
  container layoutPolicy: TableLayout new.
  container listDirection: #leftToRight.
  container wrapCentering: #topLeft.
  container wrapDirection: #topToBottom.
 
  
  1 to: 100 do:  [:i |  
 			 cell := CircleMorph new.
 			 cell extent: counterSize@counterSize.
 			 cell color: Color blue.
                    cell borderWidth: 1.
                    container addMorphBack: cell
                  ].
 
  container openInWorld.

100_calculi_done_with_a_TableLayout_object.png


 p100 := AlignmentMorph newColumn color: Color white; hResizing: #shrinkWrap; vResizing: #shrinkWrap.

 10 timesRepeat: [ |row| 
    row :=AlignmentMorph newRow color: Color white; hResizing: #shrinkWrap; vResizing: #shrinkWrap.

    color := Color blue.
    10 timesRepeat: [row addMorph: (CircleMorph new extent: 25@25; color: color)].
    p100 addMorph: row].

    p100 openInHand

100_calculi.pngSee also TableLayoutExample with 100 squares

Tag: Montessori