[Pkg] The Trunk: Morphic-mt.1583.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 29 14:09:19 UTC 2019

Marcel Taeumel uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-mt.1583
Author: mt
Time: 29 October 2019, 3:09:10.326172 pm
UUID: 2724b1c3-9a13-1c4f-811f-a5bbc8ed76e1
Ancestors: Morphic-mt.1582

Make it possible to recover from (deprecation) warnings in important drawing methods.

See http://forum.world.st/The-Trunk-System-mt-1093-mcz-tp5103937p5106420.html

=============== Diff against Morphic-mt.1582 ===============

Item was changed:
  ----- Method: WorldState>>displayWorldSafely: (in category 'update cycle') -----
  displayWorldSafely: aWorld
  	"Update this world's display and keep track of errors during draw methods."
  	| finished classesWithErrors |
  	finished := false.
  	[finished] whileFalse: [
+ 		[aWorld displayWorld. finished := true] on: Error, Halt, Warning do: [:ex |
- 		[aWorld displayWorld. finished := true] on: Error, Halt do: [:ex |
  			"Handle a drawing error"
  			| err rcvr errCtx errMorph |
  			err := ex description.
  			rcvr := ex receiver.
  			errCtx := thisContext.
  				errCtx := errCtx sender.
  				"Search the sender chain to find the morph causing the problem"
  				[errCtx notNil and:[(errCtx receiver isMorph) not]] 
  					whileTrue:[errCtx := errCtx sender].
  				"If we're at the root of the context chain then we have a fatal drawing problem"
  				errCtx ifNil:[^Project current fatalDrawingError: err].
  				errMorph := errCtx receiver.
  				"If the morph causing the problem has already the #drawError flag set,
  				then search for the next morph above in the caller chain."
  				errMorph hasProperty: #errorOnDraw
  			] whileTrue.
  			errMorph setProperty: #errorOnDraw toValue: true.
  			"Catch all errors, one for each receiver class."
  			classesWithErrors ifNil: [classesWithErrors := IdentitySet new].
  			(classesWithErrors includes: rcvr class) ifFalse: [
  				classesWithErrors add: rcvr class.
  				ToolSet debugException: ex].
  			"Repaint all to catch all errors now and not if the debugger will appear."
  			aWorld fullRepaintNeeded.

More information about the Packages mailing list