[Vm-dev] VM Maker: VMMakerUI-eem.37.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jun 22 22:01:25 UTC 2021


Eliot Miranda uploaded a new version of VMMakerUI to project VM Maker:
http://source.squeak.org/VMMaker/VMMakerUI-eem.37.mcz

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

Name: VMMakerUI-eem.37
Author: eem
Time: 22 June 2021, 3:01:24.300424 pm
UUID: 2a363fe6-bb8f-4817-a0de-5dba9bb773fd
Ancestors: VMMakerUI-eem.36

Robustess prior to display installation in the simulators' handleListenEvent:s

=============== Diff against VMMakerUI-eem.36 ===============

Item was changed:
  ----- Method: CogVMSimulator>>handleListenEvent: (in category '*VMMakerUI-I/O primitive support') -----
  handleListenEvent: aMorphicEvent
  	"openAsMorph[NoTranscript] registered me for listen events via HandMorph>>addEventListener.
+ 	Transform the listen event and add it to my event queue.  Also check if the displayForm should resize."
+ 	(displayForm notNil and: [displayForm ~~ fakeForm and: [displayForm extent ~= displayView extent]]) ifTrue:
- 	Transform the listen event and add it to my event queue.  ALso check if the displayForm should resize."
- 	(displayForm ~~ fakeForm and: [displayForm extent ~= displayView extent]) ifTrue:
  		[| newForm |
  		newForm := Form
  						extent: displayView extent
  						depth: displayForm depth.
  		 displayForm displayOn: newForm.
  		 displayForm := newForm.
  		 displayView image: displayForm].
  	((aMorphicEvent isMouse or: [aMorphicEvent isKeyboard])
  	 and: [displayView bounds containsPoint: aMorphicEvent position]) ifTrue:
  		[[eventTransformer degenerateEvent: aMorphicEvent for: self]
  			on: Error
  			do: [:ex|
  				displayView activeHand removeEventListener: self.
  				ex pass]]!

Item was changed:
  ----- Method: StackInterpreterSimulator>>handleListenEvent: (in category '*VMMakerUI-I/O primitive support') -----
  handleListenEvent: aMorphicEvent
  	"openAsMorph[NoTranscript] registered me for listen events via HandMorph>>addEventListener.
+ 	Transform the listen event and add it to my event queue.  Also check if the displayForm should resize."
+ 	(displayForm notNil and: [displayForm ~~ fakeForm and: [displayForm extent ~= displayView extent]]) ifTrue:
- 	Transform the listen event and add it to my event queue.  ALso check if the displayForm should resize."
- 	(displayForm ~~ fakeForm and: [displayForm extent ~= displayView extent]) ifTrue:
  		[| newForm |
  		newForm := Form
  						extent: displayView extent
  						depth: displayForm depth.
  		 displayForm displayOn: newForm.
  		 displayForm := newForm.
  		 displayView image: displayForm].
  	((aMorphicEvent isMouse or: [aMorphicEvent isKeyboard])
  	 and: [displayView bounds containsPoint: aMorphicEvent position]) ifTrue:
  		[[eventTransformer degenerateEvent: aMorphicEvent for: self]
  			on: Error
  			do: [:ex|
  				displayView activeHand removeEventListener: self.
  				ex pass]]!

Item was changed:
  ----- Method: StackInterpreterSimulator>>openAsMorph (in category '*VMMakerUI-InterpreterSimulation-Morphic') -----
  openAsMorph
  	"Open a morphic view on this simulation."
  	| localImageName borderWidth window |
  	localImageName := imageName
  							ifNotNil: [self localNameFor: imageName]
  							ifNil: [' synthetic image'].
  	window := (SystemWindow labelled: 'Simulation of ', localImageName) model: self.
  	window paneColor: self windowColorToUse.
  
  	window addMorph: (displayView := SimulatorImageMorph new image: displayForm)
  			frame: (0 at 0 corner: 1 at 0.8).
  	displayView activeHand addEventListener: self.
  	eventTransformer := SimulatorEventTransformer new.
  
  	transcript := TranscriptStream on: (String new: 10000).
  	window addMorph: (PluggableTextMorph
  							on: transcript text: nil accept: nil
  							readSelection: nil menu: #codePaneMenu:shifted:)
  			frame: (0 at 0.8 corner: 0.7 at 1).
  	window addMorph: (PluggableTextMorph on: self
  						text: #byteCountText accept: nil
  						readSelection: nil menu: #utilitiesMenu:) hideScrollBarsIndefinitely
  			frame: (0.7 at 0.8 corner: 1 at 1).
  
  	borderWidth := [SystemWindow borderWidth] "Squeak 4.1"
  						on: MessageNotUnderstood
  						do: [:ex| 0]. "3.8"
  	borderWidth := borderWidth + window borderWidth.
  	window openInWorldExtent: (self desiredDisplayExtent
+ 								+ (2 * borderWidth @ borderWidth)
- 								+ (2 * borderWidth at borderWidth)
  								+ (0 at window labelHeight)
  								* (1@(1/0.8))) rounded.
  	^window!



More information about the Vm-dev mailing list