[squeak-dev] The Inbox: Morphic-nice.1614.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Mon Jan 6 12:52:09 UTC 2020


Hi Nicolas. :-)

> If you have a less overkill idea, i take it :)

Yeah, I think overkill is just necessary in this case. BUT I would rather keep the MouseWheelState. See other post:
http://forum.world.st/The-Inbox-Morphic-nice-1613-mcz-tp5108896p5109478.html [http://forum.world.st/The-Inbox-Morphic-nice-1613-mcz-tp5108896p5109478.html]


Best,
Marcel
Am 29.12.2019 23:47:46 schrieb Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
Hi all,
loading this package triggers an Exception - see below.
Since I triggered the package load thru UI, a HandMorph method is still active on the stack.
But since I removed an ivar, that's the old method, not the up-to-date method...
Hence it has wrong ivar offsets, and access the wrong instance variable.
Is there any way I can abort/restart the UI process in postscript?
Or should I use complex preamble that duplicates HandMorph class, let it adopt current hand,
then complex postscript that migrate hand to the updated HandMorph class?

If you have a less overkill idea, i take it :)


29 December 2019 11:37:47.264169 pm

VM: Win32 - Smalltalk
Image: Squeak5.3beta [latest update: #19301]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir X:\Smalltalk\opensmalltalk-vm\image
Trusted Dir X:\Smalltalk\opensmalltalk-vm\image\nicolas
Untrusted Dir \\Mac\Home\Documents\My Squeak

Point(Object)>>doesNotUnderstand: #hand
Receiver: 85 at 9
Arguments and temporary variables:
aMessage: hand
exception: MessageNotUnderstood: Point>>hand
resumeValue: nil
Receiver's instance variables:
x: 85
y: 9

MouseOverHandler>>processMouseOver:
Receiver: a MouseOverHandler
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
mouseOverMorphs: {a MenuItemMorph(1214112)'copy bug report to clipboard' . a MenuMorph...etc...
enteredMorphs: a WriteStream
overMorphs: a WriteStream
leftMorphs: an OrderedCollection()

HandMorph>>handleEvent:
Receiver: a HandMorph(72556)
Arguments and temporary variables:
unfilteredEvent: [419 at 57 mouseUp ( red ) 8809265]
filteredEvent: [419 at 57 mouseUp ( red ) 8809265]
Receiver's instance variables:
bounds: 668 at 437 corner: 684 at 453
owner: a PasteUpMorph(2434915) [world]
submorphs: #()
fullBounds: 668 at 437 corner: 684 at 453
color: Color blue
extension: a MorphExtension (4039828) [eventHandler = an EventHandler]  [other:...etc...
mouseFocus: nil
keyboardFocus: a PluggableListMorphPlus(1825828)
eventListeners: nil
mouseListeners: nil
keyboardListeners: nil
eventCaptureFilters: nil
mouseCaptureFilters: nil
keyboardCaptureFilters: a WeakArray(a HandMorph(72556))
mouseClickState: nil
mouseOverHandler: a MouseOverHandler
lastMouseEvent: [668 at 437 mouseUp ( red ) 9055140]
targetOffset: 45 at 12
damageRecorder: a DamageRecorder
cacheCanvas: nil
cachedCanvasHasHoles: false
temporaryCursor: nil
temporaryCursorOffset: nil
hardwareCursor: nil
hasChanged: true
savedPatch: nil
userInitials: ''
lastEventBuffer: #(1 9055140 668 437 0 0 1 1)
genieGestureProcessor: nil
keyboardInterpreter: an UTF32InputInterpreter

HandMorph>>processEvents
Receiver: a HandMorph(72556)
Arguments and temporary variables:
evt: [419 at 57 mouseUp ( red ) 8809265]
evtBuf: #(1 8809265 419 57 0 0 1 1)
type: 1
hadAny: false
Receiver's instance variables:
bounds: 668 at 437 corner: 684 at 453
owner: a PasteUpMorph(2434915) [world]
submorphs: #()
fullBounds: 668 at 437 corner: 684 at 453
color: Color blue
extension: a MorphExtension (4039828) [eventHandler = an EventHandler]  [other:...etc...
mouseFocus: nil
keyboardFocus: a PluggableListMorphPlus(1825828)
eventListeners: nil
mouseListeners: nil
keyboardListeners: nil
eventCaptureFilters: nil
mouseCaptureFilters: nil
keyboardCaptureFilters: a WeakArray(a HandMorph(72556))
mouseClickState: nil
mouseOverHandler: a MouseOverHandler
lastMouseEvent: [668 at 437 mouseUp ( red ) 9055140]
targetOffset: 45 at 12
damageRecorder: a DamageRecorder
cacheCanvas: nil
cachedCanvasHasHoles: false
temporaryCursor: nil
temporaryCursorOffset: nil
hardwareCursor: nil
hasChanged: true
savedPatch: nil
userInitials: ''
lastEventBuffer: #(1 9055140 668 437 0 0 1 1)
genieGestureProcessor: nil
keyboardInterpreter: an UTF32InputInterpreter

[] in WorldState>>doOneCycleNowFor:
Receiver: a WorldState
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
hands: {a HandMorph(72556)}
activeHand: a HandMorph(72556)
viewBox: 0 at 0 corner: 1024 at 664
canvas: a FormCanvas on: DisplayScreen(1024x664x32)
damageRecorder: a DamageRecorder
stepList: a Heap(StepMessage(#stepAt: -> a ClockMorph(3939335)'23:37:47')(a ClockMorph...etc...
lastStepTime: 3755111867234
lastStepMessage: nil
lastCycleTime: 3755111867257
commandHistory: a CommandHistory
alarms: a MorphicAlarmQueue
lastAlarmTime: 3755111867234
remoteServer: nil
multiCanvas: nil
interCycleDelay: a Delay(20 msecs)

Array(SequenceableCollection)>>do:
Receiver: {a HandMorph(72556)}
Arguments and temporary variables:
aBlock: [closure] in WorldState>>doOneCycleNowFor:
index: 1
indexLimiT: 1
Receiver's instance variables:
{a HandMorph(72556)}

WorldState>>handsDo:
Receiver: a WorldState
Arguments and temporary variables:
aBlock: [closure] in WorldState>>doOneCycleNowFor:
Receiver's instance variables:
hands: {a HandMorph(72556)}
activeHand: a HandMorph(72556)
viewBox: 0 at 0 corner: 1024 at 664
canvas: a FormCanvas on: DisplayScreen(1024x664x32)
damageRecorder: a DamageRecorder
stepList: a Heap(StepMessage(#stepAt: -> a ClockMorph(3939335)'23:37:47')(a ClockMorph...etc...
lastStepTime: 3755111867234
lastStepMessage: nil
lastCycleTime: 3755111867257
commandHistory: a CommandHistory
alarms: a MorphicAlarmQueue
lastAlarmTime: 3755111867234
remoteServer: nil
multiCanvas: nil
interCycleDelay: a Delay(20 msecs)

WorldState>>doOneCycleNowFor:
Receiver: a WorldState
Arguments and temporary variables:
aWorld: a PasteUpMorph(2434915) [world]
capturingGesture: #(false)
Receiver's instance variables:
hands: {a HandMorph(72556)}
activeHand: a HandMorph(72556)
viewBox: 0 at 0 corner: 1024 at 664
canvas: a FormCanvas on: DisplayScreen(1024x664x32)
damageRecorder: a DamageRecorder
stepList: a Heap(StepMessage(#stepAt: -> a ClockMorph(3939335)'23:37:47')(a ClockMorph...etc...
lastStepTime: 3755111867234
lastStepMessage: nil
lastCycleTime: 3755111867257
commandHistory: a CommandHistory
alarms: a MorphicAlarmQueue
lastAlarmTime: 3755111867234
remoteServer: nil
multiCanvas: nil
interCycleDelay: a Delay(20 msecs)

WorldState>>doOneCycleFor:
Receiver: a WorldState
Arguments and temporary variables:
aWorld: a PasteUpMorph(2434915) [world]
Receiver's instance variables:
hands: {a HandMorph(72556)}
activeHand: a HandMorph(72556)
viewBox: 0 at 0 corner: 1024 at 664
canvas: a FormCanvas on: DisplayScreen(1024x664x32)
damageRecorder: a DamageRecorder
stepList: a Heap(StepMessage(#stepAt: -> a ClockMorph(3939335)'23:37:47')(a ClockMorph...etc...
lastStepTime: 3755111867234
lastStepMessage: nil
lastCycleTime: 3755111867257
commandHistory: a CommandHistory
alarms: a MorphicAlarmQueue
lastAlarmTime: 3755111867234
remoteServer: nil
multiCanvas: nil
interCycleDelay: a Delay(20 msecs)

PasteUpMorph>>doOneCycle
Receiver: a PasteUpMorph(2434915) [world]
Arguments and temporary variables:

Receiver's instance variables:
bounds: 0 at 0 corner: 1024 at 664
owner: nil
submorphs: {a PluggableSystemWindow<MessageNotUnderstood: Point>>hand>(306803) ...etc...
fullBounds: 0 at 0 corner: 1024 at 664
color: (Color r: 0.251 g: 0.259 b: 0.267)
extension: a MorphExtension (3123555) [eventHandler = an EventHandler]  [other:...etc...
borderWidth: 0
borderColor: (Color r: 0.515 g: 0.181 b: 0.263)
presenter: an EtoysPresenter (1693676)
model: a MorphicModel(3077142)
cursor: 1
padding: 3
backgroundMorph: nil
turtleTrailsForm: nil
turtlePen: nil
lastTurtlePositions: nil
isPartsBin: nil
indicateCursor: nil
wantsMouseOverHalos: nil
worldState: a WorldState
griddingOn: nil

[] in MorphicProject>>spawnNewProcess
Receiver: a MorphicProject (Unnamed1) in a PasteUpMorph(2434915) [world]
Arguments and temporary variables:

Receiver's instance variables:
dependents: nil
world: a PasteUpMorph(2434915) [world]
uiManager: a MorphicUIManager
changeSet: a ChangeSet named Unnamed1
transcript: a TranscriptStream
parentProject: a MorphicProject (Unnamed1) in a PasteUpMorph(2434915) [world]
previousProject: nil
displayDepth: 32
viewSize: 151 at 132
thumbnail: Form(151x132x32)
nextProject: nil
projectParameters: an IdentityDictionary(#PrevailingProjectFlags->an IdentityDictionary...etc...
version: nil
urlList: nil
lastDirectory: nil
lastSavedAtSeconds: nil
projectPreferenceFlagDictionary: an IdentityDictionary(#showSharedFlaps->true #showWorldMainDockingBar...etc...
resourceManager: a ResourceManager
uiProcess: a Process in nil

[] in BlockClosure>>newProcess
Receiver: [closure] in MorphicProject>>spawnNewProcess
Arguments and temporary variables:

Receiver's instance variables:
outerContext: MorphicProject>>spawnNewProcess
startpc: 93
numArgs: 0


--- The full stack ---
Point(Object)>>doesNotUnderstand: #hand
MouseOverHandler>>processMouseOver:
HandMorph>>handleEvent:
HandMorph>>processEvents
[] in WorldState>>doOneCycleNowFor:
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in MorphicProject>>spawnNewProcess
[] in BlockClosure>>newProcess


Le dim. 29 déc. 2019 à 15:08, <commits at source.squeak.org [mailto:commits at source.squeak.org]> a écrit :

Nicolas Cellier uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-nice.1614.mcz [http://source.squeak.org/inbox/Morphic-nice.1614.mcz]

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

Name: Morphic-nice.1614
Author: nice
Time: 29 December 2019, 3:07:59.051586 pm
UUID: 003857a5-817d-4dc9-bf15-80c6bc584d51
Ancestors: Morphic-nice.1613

Forgot to remove the mouseWheelState ivar from HandMorph

The testNoObsoleteClasses was already failing, but we shall not make it worse...

=============== Diff against Morphic-nice.1613 ===============

Item was changed:
  Morph subclass: #HandMorph
+       instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler lastMouseEvent targetOffset damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter'
-       instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler mouseWheelState lastMouseEvent targetOffset damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter'
        classVariableNames: 'CompositionWindowManager DoubleClickTime DragThreshold EventStats MinimalWheelDelta NewEventRules NormalCursor PasteBuffer SendMouseWheelToKeyboardFocus ShowEvents SynthesizeMouseWheelEvents'
        poolDictionaries: 'EventSensorConstants'
        category: 'Morphic-Kernel'!

  !HandMorph commentStamp: '<historical>' prior: 0!
  The cursor may be thought of as the HandMorph.  The hand's submorphs hold anything being carried by dragging. 

  There is some minimal support for multiple hands in the same world.!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200106/04d106c2/attachment.html>


More information about the Squeak-dev mailing list