<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>Hi tim,</p>
<p><br>
</p>
<p>> <span style="font-size:12pt">you absolutely do *not* reselect the original text selection after a printit because we want the printed output selected. This is to allow quick deletion (since it is already selected) or copy etc.</span></p>
<div>I think I see what you mean, but did you try loading the commit? :) #printIt calls #<span>evaluateSelectionAndDo:, and in the specified do block, it prints out the result and adjusts the selection to the output. So this will keep working fine. Or am I
 misunderstanding you?</span></div>
<div><span><br>
</span></div>
<div><span>Further, you are suggesting that we should only change the selection if the user cancels the compilation on a warning. (By the way, this selection is made in Parser >> #queryUndefined, for example. You can find out this quite easy by debugging the
 invocation of the dialog window and peeling back the stack.)</span></div>
<div><span>Personally, I would disagree with that change of behavior. Perhaps it may depend on your image's setting regarding focus & modal exclusivity, but I find it quite helpful to see the place where the error occurred selected while watching the message:</span></div>
<div><span><br>
<img size="15575" id="x_img420146" tabindex="0" style="max-width:99.9%" src="cid:e196680d-d2a1-434e-9978-be19ce648c1c"></span></div>
<div><span><br>
</span></div>
<div><span>So my point is that the selection should be changed whenever a parser notification is raised.</span></div>
<div><span>Ergo, the selection might change at some point during parsing/compiling. If the user cancels the operation, this selection should stay so the user can fix the code directly. Otherwise, the warning is skipped and the temporary selection is no longer
 relevant to the user, so we should restore the previous selection.</span></div>
<div><span><br>
</span></div>
<div><span>What am I missing? :-)</span></div>
<div><span><br>
</span></div>
<div><span>Best,</span></div>
<div><span>Christoph</span></div>
<p></p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</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 tim Rowledge <tim@rowledge.org><br>
<b>Gesendet:</b> Sonntag, 8. Dezember 2019 20:12:15<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Morphic-ct.1606.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Christoph - you absolutely do *not* reselect the original text selection after a printit because we want the printed output selected. This is to allow quick deletion (since it is already selected) or copy etc.<br>
<br>
There *is* a but shown up by the example you gave <br>
>> | x |<br>
>> x.<br>
>> 2<br>
where the compiler complaint about an unassigned var seems to mess up the selection but that is quite different. It looks like the selection gets messed up by the error handling. Somewhere code is setting the selection to be the apparently problematic variable
 name, which may well be sensible in some scenarios. However, if the result of the notification is to proceed the selection ought not have changed and the printIt result will be put in the right place.<br>
<br>
It seems proper to change the selection if the user says to not proceed; that way the problem will be selected and I think that is plausibly helpful. If the user say to proceed then the selection should not be changed. The trick now is to find the place where
 it gets changed, and I have to admit that a quick scan for usages of OutOfScopeNotification didn't enlighten me much. Somewhere in the bowels of the compiler there will be a place.<br>
<br>
tim<br>
--<br>
tim Rowledge; tim@rowledge.org; <a href="http://www.rowledge.org/tim">http://www.rowledge.org/tim</a><br>
Strange OpCodes: BBL: Branch on Burned out Light<br>
<br>
<br>
<br>
</div>
</span></font>
</body>
</html>