[etoys-dev] Etoys: Etoys-kfr.6.mcz

commits at source.squeak.org commits at source.squeak.org
Thu May 13 11:30:50 EDT 2010


Karl Ramberg uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-kfr.6.mcz

==================== Summary ====================

Name: Etoys-kfr.6
Author: kfr
Time: 13 May 2010, 5:30:10 pm
UUID: 474dee1a-9fde-9f49-99e1-c4f3c18bc308
Ancestors: Etoys-kfr.5

Removes unused class TimesRepeatMorph (is duplicate of TimesRepeatTile)

=============== Diff against Etoys-kfr.5 ===============

Item was removed:
- ----- Method: TimesRepeatMorph>>storeCodeOn:indent: (in category 'code generation') -----
- storeCodeOn: aStream indent: tabCount
- 	"Store code representing the receiver on the stream, obeying the tab state."
- 
- 	aStream nextPutAll: '(('.
- 	numberOfTimesToRepeatPart submorphs
- 		ifEmpty:
- 			[aStream nextPutAll: '0']
- 		ifNotEmpty:
- 			[numberOfTimesToRepeatPart storeCodeOn: aStream indent: tabCount + 2].
- 	aStream nextPutAll: ' ) asInteger max: 0) timesRepeat:'.
- 	tabCount + 1 timesRepeat: [aStream tab].
- 	aStream nextPutAll: '['; cr.
- 	self storeCodeBlockFor: whatToRepeatPart on: aStream indent: tabCount + 2.
- 	aStream nextPut: $].
- !

Item was removed:
- ----- Method: TimesRepeatMorph>>sexpWith: (in category 'code generation') -----
- sexpWith: dictionary
- 
- 	| n elements e |
- 	n _ SExpElement keyword: #loop.
- 	n attributeAt: #type put: 'repeat'.
- 	elements _ WriteStream on: (Array new: 3).
- 	e _ SExpElement keyword: #initial.
- 	e elements: (Array with: ((SExpElement keyword: #literal) attributeAt: #value put: '1'; yourself)).
- 	elements nextPut: e.
- 	e _ SExpElement keyword: #increment.
- 	e elements: (Array with: ((SExpElement keyword: #literal) attributeAt: #value put: '1'; yourself)).
- 	elements nextPut: e.
- 
- 	e _ SExpElement keyword: #test.
- 	numberOfTimesToRepeatPart submorphs
- 		ifEmpty:
- 			[e elements: (Array with: ((SExpElement keyword: #literal) attributeAt: #value put: '0'; yourself))]
- 		ifNotEmpty:
- 			[e elements: (Array with: (numberOfTimesToRepeatPart sexpWith: dictionary))].
- 
- 	elements nextPut: e.
- 	
- 	elements nextPut: (self sexpBlockFor: whatToRepeatPart with: dictionary).
- 	n elements: elements contents.
- 	^ n.
- 
- !

Item was removed:
- ----- Method: TimesRepeatMorph>>parseNodeWith: (in category 'code generation') -----
- parseNodeWith: encoder
- 
- 	| rec selector arg |
- 	rec _ numberOfTimesToRepeatPart submorphs
- 		ifEmpty:
- 			[encoder encodeLiteral: 0]
- 		ifNotEmpty:
- 			[numberOfTimesToRepeatPart parseNodeWith: encoder].
- 	selector _ #timesRepeat:.
- 	arg _ self blockNode: whatToRepeatPart with: encoder.
- 	^ MessageNode new
- 				receiver: rec
- 				selector: selector
- 				arguments: (Array with: arg)
- 				precedence: (selector precedence)
- 				from: encoder
- 				sourceRange: nil.
- !

Item was removed:
- CompoundTileMorph subclass: #TimesRepeatMorph
- 	instanceVariableNames: 'numberOfTimesToRepeatPart whatToRepeatPart'
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'Etoys-Scripting Tiles'!
- 
- !TimesRepeatMorph commentStamp: 'sw 1/11/2006 22:05' prior: 0!
- A variant on the CompoundTileMorph that allows a section of code to be executed as many times as a numeric-control-field indicates.  For reasons of sharing and history, the CompoundTileMorph continues to be the one for test/yes/no, and this subclass disregards those three areas and adds two of its own.!

Item was removed:
- ----- Method: TimesRepeatMorph>>targetPartFor: (in category 'initialization') -----
- targetPartFor: aMorph
- 	"Return the row into which the given morph should be inserted."
- 
- 	| centerY |
- 	centerY _ aMorph fullBounds center y.
- 	{numberOfTimesToRepeatPart, whatToRepeatPart} do: [:m |
- 		(centerY <= m bounds bottom) ifTrue: [^ m]].
- 	^ noPart
- !

Item was removed:
- ----- Method: TimesRepeatMorph>>initialize (in category 'initialization') -----
- initialize
- 	"Fully initialize the receiver."
- 
- 	| dummyColumn timesRow  timesRepeatColumn repeatRow separator repeatLabel placeHolder doLabel ephemerum |
- 	submorphs _ EmptyArray.
- 	bounds _ 0 at 0 corner: 50 at 40.
- 	self color: Color orange muchLighter.
- 
- 	self layoutPolicy: TableLayout new.
- 	self "border, and layout properties in alphabetical order..."
- 		borderColor: self color darker;
- 		borderWidth: 2; 
- 		cellSpacing: #none;
- 		cellPositioning: #topLeft;
- 		hResizing: #spaceFill;
- 		layoutInset: 0;
- 		listDirection: #leftToRight;
- 		rubberBandCells: true;
- 		vResizing: #shrinkWrap;
- 		wrapCentering: #none.
- 
- 	self setNameTo: 'Repeat Complex'.
- 
- 	dummyColumn _ AlignmentMorph newColumn.
- 	dummyColumn cellInset: 0; layoutInset: 0.
- 	dummyColumn width: 0.
- 	dummyColumn cellPositioning: #leftCenter.
- 	dummyColumn hResizing: #shrinkWrap; vResizing: #spaceFill.
- 	self addMorph: dummyColumn.
- 
- 	timesRepeatColumn _ AlignmentMorph newColumn.
- 	timesRepeatColumn setNameTo: 'Times Repeat'.
- 
- 	timesRepeatColumn cellPositioning: #topLeft.
- 	timesRepeatColumn hResizing: #spaceFill.
-  	timesRepeatColumn vResizing: #shrinkWrap.
- 	timesRepeatColumn layoutInset: 0.
- 	timesRepeatColumn borderWidth: 0.
- 	timesRepeatColumn color:  Color orange muchLighter.
- 
- 	timesRow _ AlignmentMorph newRow color: color; layoutInset: 0.
- 	timesRow minCellSize: (2 at 16).
- 	timesRow setNameTo: 'Times'.
- 	repeatLabel _ StringMorph  contents: 'Repeat' translated font:  Preferences standardEToysFont.
- 	timesRow addMorphBack: repeatLabel.
- 	timesRow vResizing: #shrinkWrap.
- 	timesRow addMorphBack: (Morph new color: color; extent: 6 at 5).  "spacer"
- 
- 	numberOfTimesToRepeatPart := TilePadMorph new setType: #Number.
- 	numberOfTimesToRepeatPart hResizing: #shrinkWrap; color: Color transparent.
- 	numberOfTimesToRepeatPart addMorphBack: (TileMorph new addArrows; setLiteral: 2).
- 	numberOfTimesToRepeatPart borderWidth: 0; layoutInset: (1 at 0).
- 
- 	timesRow addMorphBack: numberOfTimesToRepeatPart.
- 	timesRow addMorphBack: (StringMorph  contents: ' times ' font: Preferences standardEToysFont).
- 	timesRow addMorphBack: AlignmentMorph newVariableTransparentSpacer.
- 	timesRepeatColumn addMorphBack: timesRow.
- 
- 	separator _ AlignmentMorph newRow color:  Color transparent.
- 	separator vResizing: #rigid; hResizing: #spaceFill; height: 2.
- 	separator borderWidth: 0.
- 	timesRepeatColumn addMorphBack: separator.
- 
- 	repeatRow _ AlignmentMorph newRow color: color; layoutInset: 0.
- 	repeatRow minCellSize: (2 at 16).
- 	repeatRow setNameTo: 'Repeat '.
- 	placeHolder _ Morph new.
- 	placeHolder beTransparent; extent: (8 at 0).
- 	repeatRow addMorphBack: placeHolder.
- 	repeatRow vResizing: #shrinkWrap.
- 	doLabel _ StringMorph  contents: 'Do' font: Preferences standardEToysFont.
- 	repeatRow addMorphBack: doLabel.
- 	repeatRow addMorphBack: (Morph new color: color; extent: 5 at 5).  "spacer"
- 	repeatRow addMorphBack: (whatToRepeatPart _ ScriptEditorMorph new borderWidth: 0; layoutInset: 0).
- 
- 	whatToRepeatPart hResizing: #spaceFill.
- 	whatToRepeatPart vResizing: #shrinkWrap.
- 	whatToRepeatPart color: Color transparent.
- 	whatToRepeatPart setNameTo: 'Script to repeat'.
- 	whatToRepeatPart addMorphBack: (ephemerum := Morph new height: 14) beTransparent.
- 
- 	timesRepeatColumn addMorphBack: repeatRow.
- 	
- 	self addMorphBack: timesRepeatColumn.
- 	self bounds: self fullBounds.
- 
- 	ephemerum delete!

Item was removed:
- ----- Method: TimesRepeatMorph>>labelMorphs (in category 'access') -----
- labelMorphs
- 
- 	| w |
- 	w := WriteStream on: (Array new: 3).
- 	w nextPut: self submorphs second submorphs first submorphs first.
- 	w nextPut: self submorphs second submorphs first submorphs fourth.
- 	w nextPut: self submorphs second submorphs third submorphs second.
- 	^ w contents.
- !



More information about the etoys-dev mailing list