The Trunk: Morphic-mt.1607.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-mt.1607.mcz

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

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

Name: Morphic-mt.1607
Author: mt
Time: 10 December 2019, 3:18:55.581553 pm
UUID: c0e39112-b003-f94a-aee8-b06b6642074f
Ancestors: Morphic-ct.1605, Morphic-ct.1606

Merges Morphic-ct.1605 and Morphic-ct.1606 which fixes two issues:
1) dialog window did not disappear on CMD+Dot
2) text selection got messed up during interactive error correction in parser

=============== Diff against Morphic-ct.1605 ===============

Item was changed:
  ----- Method: DialogWindow>>getUserResponse (in category 'running') -----
  getUserResponse
 
  | hand world |
  self message ifEmpty: [messageMorph delete]. "Do not waste space."
  self paneMorph submorphs
  ifEmpty: ["Do not waste space and avoid strange button-row wraps."
  self paneMorph delete.
  self buttonRowMorph wrapDirection: #none].
 
  hand := self currentHand.
  world := self currentWorld.
 
  self fullBounds.
  self moveToPreferredPosition.
  self openInWorld: world.
 
  hand showTemporaryCursor: nil. "Since we are out of context, reset the cursor."
 
  hand keyboardFocus in: [:priorKeyboardFocus |
  hand mouseFocus in: [:priorMouseFocus |
  self exclusive ifTrue: [hand newMouseFocus: self].
  hand newKeyboardFocus: self.
 
  [[self isInWorld] whileTrue: [world doOneSubCycle]]
+ ifCurtailed: [self cancelDialog].
- ifCurtailed: [self abandon].
 
  hand newKeyboardFocus: priorKeyboardFocus.
  hand newMouseFocus: priorMouseFocus]].
 
  ^ result!

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 |
- | result rcvr ctxt |
  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]
+ ]
+ ensure: [
+ "The parser might change the current selection for interactive error correction."
+ self selectInterval: selectionInterval].
+
- do: [ :ex | ex resume: true].
-
  (model respondsTo: #expressionEvaluated:result:) ifTrue: [
  model perform: #expressionEvaluated:result: with: self selection with: result].
 
  ^aBlock value: result!