David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.2137.mcz
==================== Summary ====================
Name: Morphic-dtl.2137
Author: dtl
Time: 4 November 2023, 9:26:31.460718 pm
UUID: fc3f32c7-23f7-4e3c-8644-cb753d37195f
Ancestors: Morphic-tpr.2136
Method category cleanups based on Marcel's unload-etoys.33.cs Etoys removal script.
Reference squeak-dev 29-Aug-2023 Let's discuss the future of Etoys in Squeak 6.1 (and beyond)
=============== Diff against Morphic-tpr.2136 ===============
Item was changed:
+ ----- Method: AnimatedImageMorph>>addCustomMenuItems:hand: (in category 'stepping') -----
- ----- Method: AnimatedImageMorph>>addCustomMenuItems:hand: (in category 'stepping and presenter') -----
addCustomMenuItems: aMenu hand: aHand
super addCustomMenuItems: aMenu hand: aHand.
aMenu addUpdating: #steppingString action: #toggleStepping!
Item was changed:
+ ----- Method: AnimatedImageMorph>>setStepping: (in category 'stepping') -----
- ----- Method: AnimatedImageMorph>>setStepping: (in category 'stepping and presenter') -----
setStepping: aBoolean
self wantsSteps ifFalse:[^false].
aBoolean ifTrue:[self startStepping]
ifFalse:[self stopStepping].!
Item was changed:
+ ----- Method: AnimatedImageMorph>>step (in category 'stepping') -----
- ----- Method: AnimatedImageMorph>>step (in category 'stepping and presenter') -----
step
| disposal canvas current |
"If we are about to go beyond the number of images,
then loop back to the first one"
((imageIndex) >= images size)
ifTrue: [ imageIndex := 1 ]
ifFalse: [ imageIndex := imageIndex + 1 ].
current := images at: imageIndex.
"If this is the first image in the sequence, we don't
have a previous disposal to look at. So just paint
the image -- equiv to #leaveCurrent"
canvas := image getCanvas.
(imageIndex == 1)
ifTrue: [
image getCanvas drawImage: current at: current offset ]
ifFalse: [
"Otherwise, we need to look at the previous image's disposal method
to see if we should restore the background"
disposal := disposals at: imageIndex - 1.
(disposal == #restoreBackground)
ifTrue: [
"canvas
fillRectangle: self bounds
color: self color"
canvas := (Form extent: canvas extent depth: 32) getCanvas.
canvas fillRectangle: ((current offset) corner: (current offset + current extent)) color: self color.
canvas drawImage: current at: current offset ]
ifFalse: [ canvas paintImage: current at: current offset ]
].
self image: canvas form.
self stepTime: (delays at: imageIndex)!
Item was changed:
+ ----- Method: AnimatedImageMorph>>stepTime (in category 'stepping') -----
- ----- Method: AnimatedImageMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
^stepTime ifNil: [super stepTime]!
Item was changed:
+ ----- Method: AnimatedImageMorph>>stepTime: (in category 'stepping') -----
- ----- Method: AnimatedImageMorph>>stepTime: (in category 'stepping and presenter') -----
stepTime: anInteger
stepTime := anInteger!
Item was changed:
+ ----- Method: AnimatedImageMorph>>steppingString (in category 'stepping') -----
- ----- Method: AnimatedImageMorph>>steppingString (in category 'stepping and presenter') -----
steppingString
^ (self isStepping
ifTrue: ['<on>']
ifFalse: ['<off>']), 'stepping' translated!
Item was changed:
+ ----- Method: AnimatedImageMorph>>toggleStepping (in category 'stepping') -----
- ----- Method: AnimatedImageMorph>>toggleStepping (in category 'stepping and presenter') -----
toggleStepping
self wantsSteps
ifTrue: [
self isStepping
ifFalse: [self startStepping]
ifTrue: [self stopStepping]]!
Item was changed:
+ ----- Method: AnimatedImageMorph>>wantsSteps (in category 'stepping') -----
- ----- Method: AnimatedImageMorph>>wantsSteps (in category 'stepping and presenter') -----
wantsSteps
^(images size > 1)
!
Item was changed:
+ ----- Method: BalloonMorph>>step (in category 'stepping') -----
- ----- Method: BalloonMorph>>step (in category 'stepping and presenter') -----
step
"Move with target."
target ifNotNil: [self position: target position + offsetFromTarget].
!
Item was changed:
+ ----- Method: BalloonMorph>>stepTime (in category 'stepping') -----
- ----- Method: BalloonMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
^ 0 "every cycle"!
Item was changed:
+ ----- Method: ClockMorph>>step (in category 'stepping') -----
- ----- Method: ClockMorph>>step (in category 'stepping and presenter') -----
step
| time |
super step.
time := String streamContents: [ :stream |
| t |
t := Time now.
t seconds: t asSeconds. "ignore nanoSeconds"
t
print24: (show24hr == true)
showSeconds: (showSeconds == true)
on: stream].
self contents: time!
Item was changed:
+ ----- Method: ClockMorph>>stepTime (in category 'stepping') -----
- ----- Method: ClockMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
"Answer the desired time between steps in milliseconds."
^999!
Item was changed:
+ ----- Method: ColorPickerMorph>>step (in category 'stepping') -----
- ----- Method: ColorPickerMorph>>step (in category 'stepping and presenter') -----
step
sourceHand ifNotNil:
[self pickColorAt: sourceHand position].
!
Item was changed:
+ ----- Method: ColorPickerMorph>>stepTime (in category 'stepping') -----
- ----- Method: ColorPickerMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
^ 50
!
Item was changed:
+ ----- Method: DialogWindow>>step (in category 'stepping') -----
- ----- Method: DialogWindow>>step (in category 'stepping and presenter') -----
step
timeout ifNil: [^self].
timeout = 0
ifTrue: [
self stopStepping.
selectedButton performAction]
ifFalse: [
selectedButton label: ('{1} [{2}]' format: {
selectedButton valueOfProperty: #normalLabel.
timeout}).
timeout := timeout - 1]!
Item was changed:
+ ----- Method: DialogWindow>>stepTime (in category 'stepping') -----
- ----- Method: DialogWindow>>stepTime (in category 'stepping and presenter') -----
stepTime
^1000!
Item was changed:
+ ----- Method: DialogWindow>>stopAutoTrigger (in category 'stepping') -----
- ----- Method: DialogWindow>>stopAutoTrigger (in category 'stepping and presenter') -----
stopAutoTrigger
timeout ifNil: [^self].
timeout := nil.
self stopStepping.
selectedButton label: (selectedButton valueOfProperty: #normalLabel). !
Item was changed:
+ ----- Method: DoCommandOnceMorph>>step (in category 'stepping') -----
- ----- Method: DoCommandOnceMorph>>step (in category 'stepping and presenter') -----
step
| goForIt |
actionBlock ifNil: [^self stopStepping].
goForIt := actionBlock.
actionBlock := nil.
goForIt
on: ProgressTargetRequestNotification
do: [ :ex | ex resume: innerArea]. "in case a save/load progress display needs a home"
!
Item was changed:
+ ----- Method: DoCommandOnceMorph>>stepTime (in category 'stepping') -----
- ----- Method: DoCommandOnceMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
^1
!
Item was changed:
+ ----- Method: DoCommandOnceMorph>>wantsSteps (in category 'stepping') -----
- ----- Method: DoCommandOnceMorph>>wantsSteps (in category 'stepping and presenter') -----
wantsSteps
^actionBlock notNil
!
Item was changed:
+ ----- Method: HandleMorph>>startStepping (in category 'stepping') -----
- ----- Method: HandleMorph>>startStepping (in category 'stepping and presenter') -----
startStepping
"Make the receiver the keyboard focus for editing"
super startStepping.
"owner isHandMorph ifTrue:[owner newKeyboardFocus: self]."
self flag: #arNote. "make me #handleKeyboard:"!
Item was changed:
+ ----- Method: HandleMorph>>step (in category 'stepping') -----
- ----- Method: HandleMorph>>step (in category 'stepping and presenter') -----
step
pointBlock value: self center!
Item was changed:
+ ----- Method: HandleMorph>>stepTime (in category 'stepping') -----
- ----- Method: HandleMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
"Update every hundredth of a second."
^ 10
!
Item was changed:
+ ----- Method: JoystickMorph>>step (in category 'stepping') -----
- ----- Method: JoystickMorph>>step (in category 'stepping and presenter') -----
step
"Track the real joystick whose index is realJoystickIndex."
"Details:
a. if realJoystickIndex is nil we're not tracking a joystick
b. [-joyMax..joyMax] is nominal range of joystick in both X and Y
c. [-threshold..threshold] is considered 0 to compensate for poor joystick centering"
| threshold joyMax joyPt joyBtn m mCenter r scaledPt |
super step. "Run ticking user-written scripts if any"
realJoystickIndex ifNil: [^ self].
threshold := 30.
joyMax := 350.
joyPt := Sensor joystickXY: realJoystickIndex.
joyBtn := Sensor joystickButtons: realJoystickIndex.
button1 := (joyBtn bitAnd: 1) > 0.
button2 := (joyBtn bitAnd: 2) > 0.
joyPt x abs < threshold ifTrue: [joyPt := 0@joyPt y].
joyPt y abs < threshold ifTrue: [joyPt := joyPt x@0].
lastRealJoystickValue = joyPt ifTrue: [^ self].
lastRealJoystickValue := joyPt.
m := handleMorph.
mCenter := m center.
r := m owner innerBounds insetBy:
((mCenter - m fullBounds origin) corner: (m fullBounds corner - mCenter)).
scaledPt := r center + ((r extent * joyPt) / (joyMax * 2)) truncated.
m position: (scaledPt adhereTo: r) - (m extent // 2).
!
Item was changed:
+ ----- Method: JoystickMorph>>stepTime (in category 'stepping') -----
- ----- Method: JoystickMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
"Provide for as-fast-as-possible stepping in the case of a real joystick"
^ realJoystickIndex
ifNotNil:
[0] "fast as we can to track actual joystick"
ifNil:
[super stepTime]!
Item was changed:
+ ----- Method: Morph>>arrangeToStartStepping (in category 'stepping') -----
- ----- Method: Morph>>arrangeToStartStepping (in category 'stepping and presenter') -----
arrangeToStartStepping
"Arrange to start getting sent the 'step' message, but don't do that initial #step call that startStepping does"
self arrangeToStartSteppingIn: self world!
Item was changed:
+ ----- Method: Morph>>arrangeToStartSteppingIn: (in category 'stepping') -----
- ----- Method: Morph>>arrangeToStartSteppingIn: (in category 'stepping and presenter') -----
arrangeToStartSteppingIn: aWorld
"Start getting sent the 'step' message in aWorld. Like startSteppingIn:, but without the initial one to get started'"
aWorld ifNotNil:
[aWorld startStepping: self.
self changed]!
Item was changed:
+ ----- Method: Morph>>assureExternalName (in category 'naming') -----
- ----- Method: Morph>>assureExternalName (in category 'player') -----
assureExternalName
| aName |
^ (aName := self knownName) ifNil:
[self setNameTo: (aName := self externalName).
^ aName]!
Item was changed:
+ ----- Method: Morph>>externalName (in category 'naming') -----
- ----- Method: Morph>>externalName (in category 'viewer') -----
externalName
^ self knownName ifNil: [self innocuousName]!
Item was changed:
+ ----- Method: Morph>>isStepping (in category 'stepping') -----
- ----- Method: Morph>>isStepping (in category 'stepping and presenter') -----
isStepping
"Return true if the receiver is currently stepping in its world"
| aWorld |
^ (aWorld := self world)
ifNil: [false]
ifNotNil: [aWorld isStepping: self]!
Item was changed:
+ ----- Method: Morph>>isSteppingSelector: (in category 'stepping') -----
- ----- Method: Morph>>isSteppingSelector: (in category 'stepping and presenter') -----
isSteppingSelector: aSelector
"Return true if the receiver is currently stepping in its world"
| aWorld |
^ (aWorld := self world)
ifNil: [false]
ifNotNil: [aWorld isStepping: self selector: aSelector]!
Item was changed:
+ ----- Method: Morph>>knownName (in category 'naming') -----
- ----- Method: Morph>>knownName (in category 'testing') -----
knownName
"answer a name by which the receiver is known, or nil if none"
^ extension ifNotNil: [extension externalName]!
Item was changed:
+ ----- Method: Morph>>okayToDuplicate (in category 'copying') -----
- ----- Method: Morph>>okayToDuplicate (in category 'player') -----
okayToDuplicate
"Formerly this protocol was used to guard against awkward situations when there were anonymous scripts in the etoy system. Nowadays we just always allow duplication"
^ true!
Item was changed:
+ ----- Method: Morph>>playSoundNamed: (in category 'user interface') -----
- ----- Method: Morph>>playSoundNamed: (in category 'player commands') -----
playSoundNamed: soundName
"Play the sound with the given name.
Does nothing if this image lacks sound playing facilities."
SoundService default playSoundNamed: soundName asString!
Item was changed:
+ ----- Method: Morph>>start (in category 'stepping') -----
- ----- Method: Morph>>start (in category 'stepping and presenter') -----
start
"Start running my script. For ordinary morphs, this means start stepping."
self startStepping.
!
Item was changed:
+ ----- Method: Morph>>startStepping (in category 'stepping') -----
- ----- Method: Morph>>startStepping (in category 'stepping and presenter') -----
startStepping
"Start getting sent the 'step' message."
self startStepping: #stepAt: at: Time millisecondClockValue arguments: nil stepTime: nil.!
Item was changed:
+ ----- Method: Morph>>startStepping:at:arguments:stepTime: (in category 'stepping') -----
- ----- Method: Morph>>startStepping:at:arguments:stepTime: (in category 'stepping and presenter') -----
startStepping: aSelector at: scheduledTime arguments: args stepTime: stepTime
"Start stepping the receiver"
| w |
w := self world.
w ifNotNil: [
w startStepping: self at: scheduledTime selector: aSelector arguments: args stepTime: stepTime.
self changed].!
Item was changed:
+ ----- Method: Morph>>startSteppingIn: (in category 'stepping') -----
- ----- Method: Morph>>startSteppingIn: (in category 'stepping and presenter') -----
startSteppingIn: aWorld
"Start getting sent the 'step' message in aWorld"
self step. "one to get started!!"
aWorld ifNotNil: [aWorld startStepping: self].
self changed!
Item was changed:
+ ----- Method: Morph>>startSteppingSelector: (in category 'stepping') -----
- ----- Method: Morph>>startSteppingSelector: (in category 'stepping and presenter') -----
startSteppingSelector: aSelector
"Start getting sent the 'step' message."
self startStepping: aSelector at: Time millisecondClockValue arguments: nil stepTime: nil.!
Item was changed:
+ ----- Method: Morph>>step (in category 'stepping') -----
- ----- Method: Morph>>step (in category 'stepping and presenter') -----
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."
!
Item was changed:
+ ----- Method: Morph>>stepAt: (in category 'stepping') -----
- ----- Method: Morph>>stepAt: (in category 'stepping and presenter') -----
stepAt: millisecondClockValue
"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 millisecondClockValue parameter gives the value of the millisecond clock at the moment of dispatch.
Default is to dispatch to the parameterless step method for the morph, but this protocol makes it possible for some morphs to do differing things depending on the clock value"
self player ifNotNil:[:p| p stepAt: millisecondClockValue].
self step
!
Item was changed:
+ ----- Method: Morph>>stepTime (in category 'stepping') -----
- ----- Method: Morph>>stepTime (in category 'stepping and presenter') -----
stepTime
"Answer the desired time between steps in milliseconds. This default implementation requests that the 'step' method be called once every second."
^ self topRendererOrSelf player ifNotNil: [10] ifNil: [1000]!
Item was changed:
+ ----- Method: Morph>>stop (in category 'stepping') -----
- ----- Method: Morph>>stop (in category 'stepping and presenter') -----
stop
"Stop running my script. For ordinary morphs, this means stop stepping."
self stopStepping.
!
Item was changed:
+ ----- Method: Morph>>stopStepping (in category 'stepping') -----
- ----- Method: Morph>>stopStepping (in category 'stepping and presenter') -----
stopStepping
"Stop getting sent the 'step' message."
| w |
w := self world.
w ifNotNil: [w stopStepping: self].
!
Item was changed:
+ ----- Method: Morph>>stopSteppingSelector: (in category 'stepping') -----
- ----- Method: Morph>>stopSteppingSelector: (in category 'stepping and presenter') -----
stopSteppingSelector: aSelector
"Stop getting sent the given message."
| w |
w := self world.
w ifNotNil: [w stopStepping: self selector: aSelector].
!
Item was changed:
+ ----- Method: Morph>>stopSteppingSelfAndSubmorphs (in category 'stepping') -----
- ----- Method: Morph>>stopSteppingSelfAndSubmorphs (in category 'stepping and presenter') -----
stopSteppingSelfAndSubmorphs
self allMorphsDo: [:m | m stopStepping]
!
Item was changed:
+ ----- Method: Morph>>wantsRecolorHandle (in category 'halos and balloon help') -----
- ----- Method: Morph>>wantsRecolorHandle (in category 'e-toy support') -----
wantsRecolorHandle
"Answer whether the receiver would like a recoloring halo handle to be put up. Since this handle also presently affords access to the property-sheet, it is presently always allowed, even though SketchMorphs don't like regular recoloring"
^ true
!
Item was changed:
+ ----- Method: Morph>>wantsSteps (in category 'stepping') -----
- ----- Method: Morph>>wantsSteps (in category 'stepping and presenter') -----
wantsSteps
"Return true if the receiver overrides the default Morph step method."
"Details: Find first class in superclass chain that implements #step and return true if it isn't class Morph."
| c |
self isPartsDonor ifTrue: [^ false].
(self == self topRendererOrSelf) ifTrue: [self player wantsSteps ifTrue: [^ true]].
c := self class.
[c includesSelector: #step] whileFalse: [c := c superclass].
^ c ~= Morph!
Item was changed:
+ ----- Method: Morph>>wantsToBeTopmost (in category 'submorphs - layers') -----
- ----- Method: Morph>>wantsToBeTopmost (in category 'e-toy support') -----
wantsToBeTopmost
"Answer if the receiver want to be one of the topmost objects in its owner"
^ self isFlapOrTab!
Item was changed:
+ ----- Method: MovieMorph>>step (in category 'stepping') -----
- ----- Method: MovieMorph>>step (in category 'stepping and presenter') -----
step
playMode = #stop ifTrue: [^ self].
dwellCount > 0 ifTrue: [
dwellCount := dwellCount - 1.
^ self].
currentFrameIndex < frameList size
ifTrue: [^ self setFrame: currentFrameIndex + 1].
playMode = #loop
ifTrue: [self setFrame: 1]
ifFalse: [playMode := #stop].
!
Item was changed:
+ ----- Method: MovieMorph>>stepTime (in category 'stepping') -----
- ----- Method: MovieMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
^ msecsPerFrame
!
Item was changed:
+ ----- Method: NewHandleMorph>>step (in category 'stepping') -----
- ----- Method: NewHandleMorph>>step (in category 'stepping and presenter') -----
step
| eventSource |
eventSource := self sensorMode ifTrue: [
Sensor
] ifFalse: [
hand lastEvent
].
eventSource anyButtonPressed
ifTrue: [waitingForClickInside := false.
self position: eventSource cursorPoint - (self extent // 2).
pointBlock value: self center]
ifFalse: [waitingForClickInside
ifTrue: [(self containsPoint: eventSource cursorPoint)
ifFalse: ["mouse wandered out before clicked"
^ self delete]]
ifFalse: [lastPointBlock value: self center.
^ self delete]]!
Item was changed:
+ ----- Method: PasteUpMorph>>bringTopmostsToFront (in category 'geometry') -----
- ----- Method: PasteUpMorph>>bringTopmostsToFront (in category 'flaps') -----
bringTopmostsToFront
submorphs
select:[:m| m wantsToBeTopmost]
thenDo:[:m| self addMorphInLayer: m].!
Item was changed:
+ ----- Method: PasteUpMorph>>defaultNameStemForInstances (in category 'naming') -----
- ----- Method: PasteUpMorph>>defaultNameStemForInstances (in category 'viewer') -----
defaultNameStemForInstances
"Answer a basis for names of default instances of the receiver"
^ self isWorldMorph
ifFalse:
[super defaultNameStemForInstances]
ifTrue:
['world' translatedNoop]!
Item was changed:
+ ----- Method: PasteUpMorph>>step (in category 'stepping') -----
- ----- Method: PasteUpMorph>>step (in category 'stepping and presenter') -----
step
(self isWorldMorph and: [owner notNil]) ifTrue: [
^self runLocalStepMethods
].
super step!
Item was changed:
+ ----- Method: PasteUpMorph>>stepTime (in category 'stepping') -----
- ----- Method: PasteUpMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
(self isWorldMorph and: [owner notNil]) ifTrue: [
^1
].
^super stepTime!
Item was changed:
+ ----- Method: PolygonMorph>>step (in category 'stepping') -----
- ----- Method: PolygonMorph>>step (in category 'stepping and presenter') -----
step
borderDashSpec ifNil: [^super step].
borderDashSpec size < 5 ifTrue: [^super step].
"Only for dashed lines with creep"
borderDashSpec at: 4 put: (borderDashSpec fourth) + borderDashSpec fifth.
self changed.
^super step!
Item was changed:
+ ----- Method: PolygonMorph>>stepTime (in category 'stepping') -----
- ----- Method: PolygonMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
"Answer the desired time between steps in milliseconds."
^ self topRendererOrSelf player ifNotNil: [10] ifNil: [100]
"NB: in all currently known cases, polygons are not actually wrapped in TransformationMorphs, so the #topRendererOrSelf call above is probably redundant, but is retained for safety."!
Item was changed:
+ ----- Method: PolygonMorph>>wantsSteps (in category 'stepping') -----
- ----- Method: PolygonMorph>>wantsSteps (in category 'stepping and presenter') -----
wantsSteps
super wantsSteps ifTrue: [^true].
"For crawling ants effect of dashed line."
borderDashSpec ifNil: [^false].
^borderDashSpec size = 5 and: [(borderDashSpec fifth) > 0]!
Item was changed:
+ ----- Method: ProjectViewMorph>>step (in category 'stepping') -----
- ----- Method: ProjectViewMorph>>step (in category 'stepping and presenter') -----
step
| cmd |
"Check for a command that could not be executed in my subproject. Once it is done, remove the trigger. If this is too slow, make armsLengthCmd an inst var."
self seeIfNameChanged.
cmd := self valueOfProperty: #armsLengthCmd.
cmd ifNil: [^ super step].
self removeProperty: #armsLengthCmd.
project perform: cmd.
project enter.!
Item was changed:
+ ----- Method: ProjectViewMorph>>stepTime (in category 'stepping') -----
- ----- Method: ProjectViewMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
^1000!
Item was changed:
+ ----- Method: ScrollBar>>step (in category 'stepping') -----
- ----- Method: ScrollBar>>step (in category 'stepping and presenter') -----
step
| action |
action := self scrollBarAction.
action ifNotNil:[self perform: action].!
Item was changed:
+ ----- Method: ScrollBar>>stepTime (in category 'stepping') -----
- ----- Method: ScrollBar>>stepTime (in category 'stepping and presenter') -----
stepTime
^ currentScrollDelay ifNil: [300]!
Item was changed:
+ ----- Method: ScrollBar>>wantsSteps (in category 'stepping') -----
- ----- Method: ScrollBar>>wantsSteps (in category 'stepping and presenter') -----
wantsSteps
^self scrollBarAction notNil!
Item was changed:
+ ----- Method: SelectedObjectThumbnail>>step (in category 'stepping') -----
- ----- Method: SelectedObjectThumbnail>>step (in category 'stepping and presenter') -----
step
| current |
current := self selectedObject.
self setBalloonText: (current isNil
ifTrue: [noSelectedBalloonText]
ifFalse: [current externalName]).
""
self makeThumbnailFrom: current!
Item was changed:
+ ----- Method: SelectedObjectThumbnail>>stepTime (in category 'stepping') -----
- ----- Method: SelectedObjectThumbnail>>stepTime (in category 'stepping and presenter') -----
stepTime
^ 125!
Item was changed:
+ ----- Method: SketchMorph>>baseGraphic (in category 'support') -----
- ----- Method: SketchMorph>>baseGraphic (in category 'e-toy support') -----
baseGraphic
"Answer my base graphic"
^ self valueOfProperty: #baseGraphic ifAbsent:
[self setProperty: #baseGraphic toValue: originalForm.
^ originalForm]!
Item was changed:
+ ----- Method: SketchMorph>>baseGraphic: (in category 'support') -----
- ----- Method: SketchMorph>>baseGraphic: (in category 'e-toy support') -----
baseGraphic: aForm
"Remember the given form as the receiver's base graphic"
^ self setProperty: #baseGraphic toValue: aForm!
Item was changed:
+ ----- Method: SketchMorph>>flipHorizontal (in category 'support') -----
- ----- Method: SketchMorph>>flipHorizontal (in category 'e-toy support') -----
flipHorizontal
| r |
r := self rotationCenter.
self left: self left - (1.0 - (2 * r x) * self width).
self form: (self form flipBy: #horizontal centerAt: self form center).
self rotationCenter: (1 - r x) @ (r y).!
Item was changed:
+ ----- Method: SketchMorph>>flipVertical (in category 'support') -----
- ----- Method: SketchMorph>>flipVertical (in category 'e-toy support') -----
flipVertical
| r |
r := self rotationCenter.
self top: self top - (1.0 - (2 * r y) * self height).
self form: (self form flipBy: #vertical centerAt: self form center).
self rotationCenter: r x @ (1 - r y).!
Item was changed:
+ ----- Method: SketchMorph>>forwardDirection: (in category 'rotate scale and flex') -----
- ----- Method: SketchMorph>>forwardDirection: (in category 'geometry eToy') -----
forwardDirection: degrees
"If not rotating normally, update my rotatedForm"
super forwardDirection: degrees.
rotationStyle == #normal ifFalse:[self layoutChanged].!
Item was changed:
+ ----- Method: SketchMorph>>rotationStyle (in category 'support') -----
- ----- Method: SketchMorph>>rotationStyle (in category 'e-toy support') -----
rotationStyle
^ rotationStyle
!
Item was changed:
+ ----- Method: SketchMorph>>rotationStyle: (in category 'support') -----
- ----- Method: SketchMorph>>rotationStyle: (in category 'e-toy support') -----
rotationStyle: aSymbol
"Set my rotation style to #normal, #leftRight, #upDown, or #none. Styles mean:
#normal -- continuous 360 degree rotation
#leftRight -- quantize angle to left or right facing
#upDown -- quantize angle to up or down facing
#none -- do not rotate
Because my rendering code flips the form (see generateRotatedForm) we 'pre-flip' it here to preserve the same visual appearance.
"
| wasFlippedX wasFlippedY isFlippedX isFlippedY |
wasFlippedX := rotationStyle == #leftRight
and: [ self heading asSmallAngleDegrees < 0.0 ].
wasFlippedY := rotationStyle == #upDown
and: [ self heading asSmallAngleDegrees abs > 90.0 ].
rotationStyle := aSymbol.
isFlippedX := rotationStyle == #leftRight
and: [ self heading asSmallAngleDegrees < 0.0 ].
isFlippedY := rotationStyle == #upDown
and: [ self heading asSmallAngleDegrees abs > 90.0 ].
wasFlippedX == isFlippedX
ifFalse: [self form: (self form flipBy: #horizontal centerAt: self form center)].
wasFlippedY == isFlippedY
ifFalse: [self form: (self form flipBy: #vertical centerAt: self form center)].
self layoutChanged.
!
Item was changed:
+ ----- Method: SketchMorph>>wantsRecolorHandle (in category 'support') -----
- ----- Method: SketchMorph>>wantsRecolorHandle (in category 'e-toy support') -----
wantsRecolorHandle
"Answer whether the receiver would like a recolor handle to be
put up for it. We'd want to disable this but for the moment
that would cut off access to the button part of the properties
sheet. So this remains a loose end."
^ false!
Item was changed:
+ ----- Method: StepMessage>>stepTime (in category 'stepping') -----
- ----- Method: StepMessage>>stepTime (in category 'stepping and presenter') -----
stepTime
"Return the step time for this message. If nil, the receiver of the message will be asked for its #stepTime."
^stepTime!
Item was changed:
+ ----- Method: ThreePhaseButtonMorph>>step (in category 'stepping') -----
- ----- Method: ThreePhaseButtonMorph>>step (in category 'stepping and presenter') -----
step
(self hasProperty: #doesButtonAction) ifTrue:[
self doButtonAction.
self setProperty: #didButtonAction toValue: true.
].!
Item was changed:
+ ----- Method: ThreePhaseButtonMorph>>stepTime (in category 'stepping') -----
- ----- Method: ThreePhaseButtonMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
(self hasProperty: #doesButtonAction) ifTrue:[^1].
^super stepTime!
Item was changed:
+ ----- Method: ThreePhaseButtonMorph>>wantsSteps (in category 'stepping') -----
- ----- Method: ThreePhaseButtonMorph>>wantsSteps (in category 'stepping and presenter') -----
wantsSteps
^(self hasProperty: #doesButtonAction) or:[super wantsSteps]!
Item was changed:
+ ----- Method: TransformationMorph>>stepTime (in category 'stepping') -----
- ----- Method: TransformationMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
"Answer the stepTime of my rendered morph if posible"
| rendered |
rendered := self renderedMorph.
rendered = self ifTrue: [^super stepTime]. "Hack to avoid infinite recursion"
^rendered stepTime.
!
Item was changed:
+ ----- Method: UpdatingMenuItemMorph>>arrangeToStartSteppingIn: (in category 'stepping') -----
- ----- Method: UpdatingMenuItemMorph>>arrangeToStartSteppingIn: (in category 'stepping and presenter') -----
arrangeToStartSteppingIn: aWorld
super arrangeToStartSteppingIn: aWorld.
self updateContents.!
Item was changed:
+ ----- Method: UpdatingMenuItemMorph>>step (in category 'stepping') -----
- ----- Method: UpdatingMenuItemMorph>>step (in category 'stepping and presenter') -----
step
super step.
self updateContents.!
Item was changed:
+ ----- Method: UpdatingMenuItemMorph>>stepTime (in category 'stepping') -----
- ----- Method: UpdatingMenuItemMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
^ 1200!
Item was changed:
+ ----- Method: UpdatingSimpleButtonMorph>>step (in category 'stepping') -----
- ----- Method: UpdatingSimpleButtonMorph>>step (in category 'stepping and presenter') -----
step
"If appropriate update the receiver's label"
| newString |
super step.
wordingProvider ifNotNil:
[newString := wordingProvider perform: wordingSelector.
newString = self label ifFalse: [self labelString: newString; changed]]!
Item was changed:
+ ----- Method: UpdatingSimpleButtonMorph>>stepTime (in category 'stepping') -----
- ----- Method: UpdatingSimpleButtonMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
"Answer the desired time between steps in milliseconds. If the receiver has a wordingProvider that may dynamically provide changed wording for the label, step once every 1.5 seconds"
^ wordingProvider ifNotNil: [1500] ifNil: [super stepTime]!
Item was changed:
+ ----- Method: UpdatingSimpleButtonMorph>>wantsSteps (in category 'stepping') -----
- ----- Method: UpdatingSimpleButtonMorph>>wantsSteps (in category 'stepping and presenter') -----
wantsSteps
"Answer whether the receiver wishes to be sent the #step message. In the current case, this decision depends on whether there is a wordingProvider which can dynamically provide fresh wording for the button's label"
^ wordingProvider notNil!
Item was changed:
+ ----- Method: UpdatingStringMorph>>step (in category 'stepping') -----
- ----- Method: UpdatingStringMorph>>step (in category 'stepping and presenter') -----
step
| s |
super step.
hasFocus ifFalse:
["update contents, but only if user isn't editing this string"
s := self readFromTarget.
s = contents ifFalse:
[self updateContentsFrom: s]]
!
Item was changed:
+ ----- Method: UpdatingStringMorph>>stepTime (in category 'stepping') -----
- ----- Method: UpdatingStringMorph>>stepTime (in category 'stepping and presenter') -----
stepTime
^ stepTime ifNil: [200]
!
Item was changed:
+ ----- Method: UpdatingThreePhaseButtonMorph>>step (in category 'stepping') -----
- ----- Method: UpdatingThreePhaseButtonMorph>>step (in category 'stepping and presenter') -----
step
| newBoolean |
super step.
state == #pressed ifTrue: [^ self].
newBoolean := target perform: getSelector.
newBoolean == self isOn
ifFalse:
[self state: (newBoolean == true ifTrue: [#on] ifFalse: [#off])]!
Item was changed:
+ ----- Method: UpdatingThreePhaseButtonMorph>>wantsSteps (in category 'stepping') -----
- ----- Method: UpdatingThreePhaseButtonMorph>>wantsSteps (in category 'stepping and presenter') -----
wantsSteps
^ true!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-dtl.1531.mcz
==================== Summary ====================
Name: Kernel-dtl.1531
Author: dtl
Time: 4 November 2023, 9:25:54.48388 pm
UUID: 374b5200-d152-41f1-9b45-ab4aec154e77
Ancestors: Kernel-tpr.1530
Method category cleanups based on Marcel's unload-etoys.33.cs Etoys removal script.
Reference squeak-dev 29-Aug-2023 Let's discuss the future of Etoys in Squeak 6.1 (and beyond)
=============== Diff against Kernel-tpr.1530 ===============
Item was changed:
+ ----- Method: Object>>haltIfNil (in category 'debugging-haltOnce') -----
- ----- Method: Object>>haltIfNil (in category 'testing') -----
haltIfNil!
David T. Lewis uploaded a new version of 61Deprecated to project The Trunk:
http://source.squeak.org/trunk/61Deprecated-dtl.11.mcz
==================== Summary ====================
Name: 61Deprecated-dtl.11
Author: dtl
Time: 4 November 2023, 6:47:32.019425 pm
UUID: f5802231-376e-4c41-a0b6-caf4e009940e
Ancestors: 61Deprecated-ul.10
DeferredActionStandardSystemController was used for deferred message delivery in MVC in early images but is no longer used or required. It reentered the image in a merge of code from the Etoys image (EToys-tfel.158). Deprecate it now.
=============== Diff against 61Deprecated-ul.10 ===============
Item was changed:
SystemOrganization addCategory: #'61Deprecated-ST80-Support'!
SystemOrganization addCategory: #'61Deprecated-Morphic-Support'!
+ SystemOrganization addCategory: #'61Deprecated-Etoys-Squeakland-Tools-Process Browser'!
Item was added:
+ StandardSystemController subclass: #DeferredActionStandardSystemController
+ instanceVariableNames: 'queue'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: '61Deprecated-Etoys-Squeakland-Tools-Process Browser'!
+
+ !DeferredActionStandardSystemController commentStamp: '<historical>' prior: 0!
+ This is a StandardSystemController that can queue up objects to be evaluated before its control loop.!
Item was added:
+ ----- Method: DeferredActionStandardSystemController>>addDeferredUIMessage: (in category 'as yet unclassified') -----
+ addDeferredUIMessage: valuableObject
+ queue nextPut: valuableObject!
Item was added:
+ ----- Method: DeferredActionStandardSystemController>>controlActivity (in category 'as yet unclassified') -----
+ controlActivity
+ [queue isEmpty]
+ whileFalse: [queue next value].
+ ^super controlActivity!
Item was added:
+ ----- Method: DeferredActionStandardSystemController>>initialize (in category 'as yet unclassified') -----
+ initialize
+ super initialize.
+ queue := SharedQueue new.!