[Pkg] The Trunk: EToys-tfel.256.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Sep 27 13:49:16 UTC 2016
Tim Felgentreff uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tfel.256.mcz
==================== Summary ====================
Name: EToys-tfel.256
Author: tfel
Time: 27 September 2016, 3:48:35.810629 pm
UUID: 67cc3cc0-a391-2e4e-af52-dd6bbc2e1f03
Ancestors: EToys-tfel.255
- various fixes for the mentoring event recorder
- utility methods for etoys course
=============== Diff against EToys-tfel.255 ===============
Item was changed:
----- Method: InteriorSolidSugarSuppliesTab>>mouseMove: (in category 'event handling') -----
mouseMove: evt
"Handle a mouse-move within the solid tab."
| aPosition newReferentThickness adjustedPosition thick aWorldlet |
+ true ifTrue: [^ self].
dragged ifFalse: [(thick := self referentThickness) > 0
ifTrue: [lastReferentThickness := thick]].
aWorldlet := self ownerThatIsA: Worldlet.
aPosition := evt cursorPoint - aWorldlet position.
edgeToAdhereTo == #top
ifTrue:
[adjustedPosition := aPosition - evt hand targetOffset.
newReferentThickness := adjustedPosition y - self navBarHeight]
ifFalse:
[adjustedPosition := aPosition - evt hand targetOffset.
newReferentThickness := aWorldlet height - (adjustedPosition y + self navBarHeight + self height)].
self applyThickness: newReferentThickness.
dragged := true.
self fitOnScreen!
Item was changed:
----- Method: MentoringEventRecorder>>handleListenEvent: (in category 'events-processing') -----
handleListenEvent: anEvent
"Process a listen event."
anEvent hand == recHand ifFalse: [^ self]. "not for me"
(#(recording recordingWithSound) includes: self state) ifFalse:
["If user got an error while recording and deleted recorder, will still be listening"
recHand ifNotNil: [recHand removeEventListener: self].
^ self].
+ anEvent timeStamp: Time millisecondClockValue. "Workaround a bug in Windows VM"
anEvent = lastEvent ifTrue: [^ self].
(anEvent isKeyboard and: [anEvent keyValue = 27 "esc"])
ifTrue: [^ self handleEscape].
time := anEvent timeStamp.
tapeStream ifNotNil:
[tapeStream nextPut: (anEvent copy setHand: nil)].
lastEvent := anEvent!
Item was changed:
----- Method: MentoringEventRecorder>>pauseIn: (in category 'pause/resume') -----
pauseIn: aWorld
"Suspend -- a stop command, typically because an EOF event was found on the event tape being played."
(#(recordingWithSound playbackAddingVoiceover) includes: self state) ifTrue:
[self terminateVoiceRecording.
self state: #atEndOfPlayback.
recHand ifNotNil: [recHand removeEventListener: self].
recHand := nil.].
(#(playback) includes: self state) ifTrue:
[self state: #suspendedPlay.
playHand ifNotNil:
[playHand halo ifNotNil: [playHand halo delete].
playHand delete].
aWorld removeHand: playHand.
self removeProperty: #suspendedContentArea.
playHand := nil.
+ recordingSpace playingEnded.
+ aWorld firstHand showHardwareCursor: true]
- recordingSpace playingEnded]
!
Item was changed:
----- Method: MentoringEventRecorder>>resumePlayIn: (in category 'pause/resume') -----
resumePlayIn: aWorld
"Playback"
| anEvent aPosition |
recordingSpace abandonReplayHandsAndHalos.
self flag: #deferred. "I guess it's the above line that messes up the nesting of these guys..."
self state: #playback.
recordingSpace populateControlsPanel.
aWorld doOneCycle.
playHand := HandMorphForReplay new recorder: self.
[((anEvent := tapeStream next) notNil and: [(anEvent isKindOf: UserInputEvent) not])]
whileTrue: [].
aPosition := anEvent
ifNil:
[recordingSpace contentArea center]
ifNotNil:
[anEvent position].
tapeStream reset.
playHand position: aPosition + recordingSpace areaOffset.
aWorld addHand: playHand.
playHand newKeyboardFocus: aWorld.
+ playHand userInitials: '' andPicture: nil.
- playHand userInitials: 'play' andPicture: nil.
lastEvent := nil.
lastDelta := 0 at 0.
startPlaybackTime := Time millisecondClockValue.
millisecondsIntoPlayback := 0.
self findPlayOffset.
self synchronize
!
Item was changed:
----- Method: PasteUpMorph>>impartPrivatePresenter (in category '*Etoys-playfield') -----
impartPrivatePresenter
presenter ifNil:
[presenter := EtoysPresenter new associatedMorph: self.
+ "presenter standardPlayer"]!
- presenter standardPlayer]!
Item was added:
+ ----- Method: Project class>>cleanUpEtoysGarbage (in category '*Etoys-Squeakland-utilities') -----
+ cleanUpEtoysGarbage
+ "Project cleanUpEtoysGarbage"
+ "All these should eventuall go away and be fixed, but for now we have this here."
+ Smalltalk garbageCollect.
+ "Clear weak message sends to remove modal windows from worlds that are closing."
+ (WeakMessageSend allInstances select: [:wm |
+ (wm receiver isKindOf: PasteUpMorph) and: [wm selector = #removeModalWindow]]) do: [:wm | wm receiver: nil].
+ "Clear the weak dictionary on the class side that keeps node state around in the rewriter"
+ KedamaEvaluatorNodeState initialize.
+ "Clear the KedamaEvaluator that holds on to the last Kedama world"
+ ScriptEditorMorph setDefaultEvaluator.
+ "Clear the hard references to player classes, "
+ (Smalltalk organization listAtCategoryNamed: 'UserObjects') do: [:name |
+ Smalltalk forgetClass: (Smalltalk classNamed: name) logged: false].
+ Player withAllSubclasses
+ select: [:c | c isSystemDefined not]
+ thenDo: [:c | c superclass removeSubclass: c].
+ "Clear the paste buffer"
+ HandMorph initialize.
+ "Clear the reference to the project tree in SkObject"
+ SkObject initialize.
+ Smalltalk garbageCollect.!
Item was added:
+ ----- Method: Project class>>makeANewLocalGallery (in category '*Etoys-Squeakland-utilities') -----
+ makeANewLocalGallery
+ | m pvm |
+ m := Morph new
+ changeTableLayout;
+ listDirection: #leftToRight;
+ wrapDirection: #topToBottom;
+ yourself.
+ (((FileDirectory default fileNamesMatching: '*.pr')
+ collect: [:name | (Project parseProjectFileName: name) first]) asSet sorted) do: [:name |
+ pvm := ProjectViewMorph new.
+ m addMorph: (pvm
+ project: (DiskProxy global: #Project selector: #named: args: {name}))].
+ m openInHand!
More information about the Packages
mailing list