<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>I wonder whether #<span>expressionEvaluated:result: should also be sent when #evaluateExpression:[requestor:]has been specified ... But I don't have any use case for this right now. :-)</span></p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Samstag, 12. Februar 2022 16:35:27<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org; packages@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Trunk: ST80-ct.277.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Christoph Thiede uploaded a new version of ST80 to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/ST80-ct.277.mcz">http://source.squeak.org/trunk/ST80-ct.277.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: ST80-ct.277<br>
Author: ct<br>
Time: 12 February 2022, 4:35:24.626701 pm<br>
UUID: deaa99ff-7f5c-9b49-89c6-04515f054832<br>
Ancestors: ST80-mt.276<br>
<br>
Adds missing support for evaluation hooks that are already present in Morphic. Complements Morphic-ct.1893.<br>
<br>
This includes:<br>
- #environment<br>
- #evaluateExpression:[requestor:]<br>
- #expressionEvaluated:result:<br>
<br>
=============== Diff against ST80-mt.276 ===============<br>
<br>
Item was changed:<br>
  ----- Method: ParagraphEditor>>evaluateSelectionAndDo: (in category 'do-its') -----<br>
  evaluateSelectionAndDo: aBlock<br>
         "Treat the current selection as an expression; evaluate it and invoke aBlock with the result."<br>
         | result rcvr ctxt |<br>
         self lineSelectAndEmptyCheck: [^ nil].<br>
  <br>
+        (model respondsTo: #evaluateExpression:requestor:) ifTrue: [<br>
+                ^ aBlock value: (model perform: #evaluateExpression:requestor: with: self selection with: self)].<br>
+        (model respondsTo: #evaluateExpression:) ifTrue: [<br>
+                ^ aBlock value: (model perform: #evaluateExpression: with: self selection)].<br>
+        <br>
         (model respondsTo: #doItReceiver) <br>
                 ifTrue: [ rcvr := model doItReceiver.<br>
                                 ctxt := model doItContext]<br>
                 ifFalse: [rcvr := ctxt := nil].<br>
         result := [<br>
                 rcvr class evaluatorClass new <br>
                         evaluate: self selectionAsStream<br>
                         in: ctxt<br>
                         to: rcvr<br>
+                        environment: (model environment ifNil: [Smalltalk globals])<br>
                         notifying: self<br>
+                        ifFail: [self flash. ^ nil]<br>
-                        ifFail: [self flash. ^nil]<br>
                         logged: true.<br>
         ] <br>
                 on: OutOfScopeNotification <br>
                 do: [ :ex | ex resume: true].<br>
+        <br>
+        (model respondsTo: #expressionEvaluated:result:) ifTrue: [<br>
+                model perform: #expressionEvaluated:result: with: self selection with: result].<br>
+        <br>
         ^aBlock value: result!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>