The Trunk: Morphic-nice.1658.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-nice.1658.mcz

commits-2
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.1658.mcz

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

Name: Morphic-nice.1658
Author: nice
Time: 8 May 2020, 8:50:24.72885 pm
UUID: 2a38c670-7623-4bd4-b3cf-6f0cd6449aea
Ancestors: Morphic-nice.1657, Morphic-ct.1640

Merge Morphic-ct.1640 for correct insertion of evaluation result

=============== Diff against Morphic-nice.1657 ===============

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 |
-
- | 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 := [
  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.
-
  (model respondsTo: #expressionEvaluated:result:) ifTrue: [
  model perform: #expressionEvaluated:result: with: self selection with: result].
 
  ^aBlock value: result!