<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Only drawback: If you copy the result to use it for another computation, you spread the link formatting all over your code ...</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Dienstag, 12. November 2019 10:36:07<br>
<b>An:</b> John Pfersich via Squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Morphic-ct.1586.mcz</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
+1
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 10.11.2019 16:07:23 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: #000000;font-family: Calibri,Helvetica,sans-serif">
<p><img size="70473" id="x_img729163" tabindex="0" style="max-width:99.9%" src="cid:23717c7d-e38c-4ef9-b852-51c42943885d"><!-- </img> --><br>
</p>
<div id="x_Signature">
<div name="x_divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif;font-size: ;margin: 0">
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif;color: #000000"><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> Sonntag, 10. November 2019 16:06:26<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: Morphic-ct.1586.mcz</span>
<div> </div>
</div>
</div>
<span style="font-size: 10pt"><span style="font-size: 10pt">
<div class="PlainText">A new version of Morphic was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Morphic-ct.1586.mcz">http://source.squeak.org/inbox/Morphic-ct.1586.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-ct.1586<br>
Author: ct<br>
Time: 10 November 2019, 4:06:17.228559 pm<br>
UUID: d752eb23-2116-0945-b043-aff08fed94fd<br>
Ancestors: Morphic-mt.1584<br>
<br>
Proposal: Style printIt results as a pluggable link that can be clicked to inspect the result.<br>
<br>
To enable this behavior, this commit also extends #insertAndSelect:at: to allow for inserting both strings and texts.<br>
<br>
=============== Diff against Morphic-mt.1584 ===============<br>
<br>
Item was changed:<br>
  ----- Method: PluggableTextMorph>>printIt (in category 'menu commands') -----<br>
  printIt<br>
         | oldEditor |<br>
         textMorph editor selectFrom: selectionInterval first to: selectionInterval last;<br>
                                                 model: model.  "For, eg, evaluateSelection"<br>
         textMorph handleEdit: [(oldEditor := textMorph editor) evaluateSelectionAndDo:<br>
                 [:result |<br>
                 selectionInterval := oldEditor selectionInterval.<br>
                 textMorph installEditorToReplace: oldEditor.<br>
+                textMorph handleEdit: [ oldEditor afterSelectionInsertAndSelect:<br>
+                        (oldEditor printTextFor: result)].<br>
-                textMorph handleEdit: [oldEditor afterSelectionInsertAndSelect: result printString].<br>
                 selectionInterval := oldEditor selectionInterval.<br>
         <br>
                 textMorph editor selectFrom: selectionInterval first to: selectionInterval last.<br>
                 self scrollSelectionIntoView]]!<br>
<br>
Item was changed:<br>
  ----- Method: TextEditor>>afterSelectionInsertAndSelect: (in category 'new selection') -----<br>
+ afterSelectionInsertAndSelect: aStringOrText<br>
- afterSelectionInsertAndSelect: aString<br>
  <br>
+        self insertAndSelect: aStringOrText at: self stopIndex !<br>
-        self insertAndSelect: aString at: self stopIndex !<br>
<br>
Item was changed:<br>
  ----- Method: TextEditor>>insertAndSelect:at: (in category 'new selection') -----<br>
+ insertAndSelect: aStringOrText at: anInteger<br>
- insertAndSelect: aString at: anInteger<br>
  <br>
+        aStringOrText isString ifTrue: [<br>
+                ^ self<br>
+                        insertAndSelect: (Text string: aStringOrText attributes: emphasisHere)<br>
+                        at: anInteger].<br>
-        self closeTypeIn.<br>
         <br>
+        self closeTypeIn.<br>
         self selectInvisiblyFrom: anInteger to: anInteger - 1.<br>
         self openTypeIn.<br>
  <br>
         self<br>
                 replace: self selectionInterval<br>
+                with: (Text string: ' ' attributes: emphasisHere), aStringOrText<br>
-                with: (Text string: (' ', aString) attributes: emphasisHere)<br>
                 and: [].<br>
- <br>
         self closeTypeIn.!<br>
<br>
Item was changed:<br>
  ----- Method: TextEditor>>printIt (in category 'do-its') -----<br>
  printIt<br>
  <br>
         self evaluateSelectionAndDo: [:result |<br>
                 (model respondsTo: #printIt:result:)<br>
                         ifTrue: [model<br>
                                 perform: #printIt:result:<br>
                                 with: self selection<br>
                                 with: result]<br>
+                        ifFalse: [self afterSelectionInsertAndSelect: (self printTextFor: result)]]!<br>
-                        ifFalse: [self afterSelectionInsertAndSelect: result printString]]!<br>
<br>
Item was added:<br>
+ ----- Method: TextEditor>>printTextFor: (in category 'do-its') -----<br>
+ printTextFor: anObject<br>
+ <br>
+        ^ Text<br>
+                string: anObject printString<br>
+                attributes: {PluggableTextAttribute evalBlock: [anObject inspect]}!<br>
<br>
<br>
</div>
</span></span></div>
</blockquote>
</div>
</div>
</body>
</html>