[etoys-dev] Etoys: Etoys-Richo.100.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Feb 3 18:31:33 EST 2012
Ricardo Moran uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-Richo.100.mcz
==================== Summary ====================
Name: Etoys-Richo.100
Author: Richo
Time: 3 February 2012, 8:30:10 pm
UUID: f95a393c-27a3-e541-a345-4fd66b47cd8f
Ancestors: Etoys-kfr.99
* Fixed step button behavior when #batchPenTrails option is on.
=============== Diff against Etoys-kfr.99 ===============
Item was changed:
Object subclass: #EtoysDebugger
+ instanceVariableNames: 'scriptEditor next timesToRepeat highlighter startingPosition'
- instanceVariableNames: 'scriptEditor next timesToRepeat highlighter'
classVariableNames: ''
poolDictionaries: ''
category: 'Etoys-Debugger'!
Item was changed:
+ ----- Method: EtoysDebugger>>delete (in category 'initialization') -----
- ----- Method: EtoysDebugger>>delete (in category 'as yet unclassified') -----
delete
highlighter ifNotNil: [:h | h delete]!
Item was changed:
----- Method: EtoysDebugger>>evaluateNextTile (in category 'evaluating') -----
evaluateNextTile
+ [next = (scriptEditor tiles at: 1 ifAbsent: [nil])
+ ifTrue: ["We are about to evaluate the first tile"
+ self updateStartingPosition].
+ self trailMorph batchPenTrails
+ ifTrue: [self evaluateNextTileWithBatchPenTrails]
+ ifFalse: [next evaluateOn: self]]
- [next evaluateOn: self]
on: Error do: [:err || newNext |
newNext := scriptEditor tiles at: 1 ifAbsent: [^ self].
newNext = next
ifTrue: [err pass]
ifFalse: [next := newNext].
+ self evaluateNextTile]
+
+ !
- self evaluateNextTile]!
Item was added:
+ ----- Method: EtoysDebugger>>evaluateNextTileWithBatchPenTrails (in category 'evaluating') -----
+ evaluateNextTileWithBatchPenTrails
+ | penDown |
+ penDown := self scriptedPlayer getPenDown.
+ self scriptedPlayer setPenDown: false.
+ [next evaluateOn: self]
+ ensure: [self scriptedPlayer setPenDown: penDown].
+ (penDown and: [next = (scriptEditor tiles at: 1 ifAbsent: [nil])])
+ ifTrue: [| trailMorph tfm |
+ "We've just evaluated the last tile, we should draw pen trail"
+ trailMorph := self trailMorph.
+ tfm := self scriptedPlayer costume owner transformFrom: trailMorph.
+ trailMorph
+ drawPenTrailFor: self scriptedPlayer costume
+ from: (tfm localPointToGlobal: startingPosition)
+ to: (tfm localPointToGlobal: self scriptedPlayerPosition)]!
Item was changed:
----- Method: EtoysDebugger>>initializeWith: (in category 'initialization') -----
initializeWith: aScriptEditorMorph
scriptEditor := aScriptEditorMorph.
next := scriptEditor tiles at: 1 ifAbsent: nil.
+ self updateStartingPosition;
+ initialize!
- self initialize!
Item was added:
+ ----- Method: EtoysDebugger>>scriptedPlayer (in category 'accessing') -----
+ scriptedPlayer
+ ^ scriptEditor playerScripted!
Item was added:
+ ----- Method: EtoysDebugger>>scriptedPlayerPosition (in category 'accessing') -----
+ scriptedPlayerPosition
+ ^ self scriptedPlayer costume
+ ifNil: [0 at 0]
+ ifNotNil: [:m | m referencePosition]!
Item was added:
+ ----- Method: EtoysDebugger>>trailMorph (in category 'accessing') -----
+ trailMorph
+ ^ self scriptedPlayer costume ifNil: [World] ifNotNil: [:m | m trailMorph]!
Item was added:
+ ----- Method: EtoysDebugger>>updateStartingPosition (in category 'initialization') -----
+ updateStartingPosition
+ startingPosition := self scriptedPlayerPosition!
More information about the etoys-dev
mailing list