[squeak-dev] The Trunk: Morphic-mt.1608.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Dec 13 09:02:37 UTC 2019


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1608.mcz

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

Name: Morphic-mt.1608
Author: mt
Time: 13 December 2019, 10:02:28.682784 am
UUID: aefd108e-0a66-0041-a417-669c5b08df12
Ancestors: Morphic-mt.1607

Fixes a small glitch that I introduced in the last commit.

=============== Diff against Morphic-mt.1607 ===============

Item was changed:
  ----- Method: TextEditor>>evaluateSelectionAndDo: (in category 'do-its') -----
  evaluateSelectionAndDo: aBlock
  	"Treat the current selection as an expression; evaluate it and invoke aBlock with the result."
  
  	| result rcvr ctxt selectionInterval |
  	self lineSelectAndEmptyCheck: [^ nil].
  
  	(model respondsTo: #evaluateExpression:) ifTrue: [
  		^ aBlock value: (model perform: #evaluateExpression: with: self selection)].
  
  	(model respondsTo: #doItReceiver) 
  		ifTrue: [ rcvr := model doItReceiver.
  				ctxt := model doItContext]
  		ifFalse: [rcvr := ctxt := nil].
  
  	selectionInterval := self selectionInterval.
+ 	result := [
- 	result := [[
  		rcvr class evaluatorClass new 
  			evaluate: self selectionAsStream
  			in: ctxt
  			to: rcvr
  			environment: (model environment ifNil: [Smalltalk globals])
  			notifying: self
  			ifFail: [morph flash. ^ nil]
  			logged: true.
  	] 
  		on: OutOfScopeNotification 
+ 		do: [ :ex | ex resume: true].
+ 	"The parser might change the current selection for interactive error correction."
+ 	self selectInterval: selectionInterval.
- 		do: [ :ex | ex resume: true]
- 	]
- 		ensure: [
- 			"The parser might change the current selection for interactive error correction."
- 			self selectInterval: selectionInterval].
  	
  	(model respondsTo: #expressionEvaluated:result:) ifTrue: [
  		model perform: #expressionEvaluated:result: with: self selection with: result].
  		
  	^aBlock value: result!



More information about the Squeak-dev mailing list