<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto">Hi Karl --</div>
<div dir="auto"><br>
</div>
<div dir="auto">Please do not use TextMorohForEditView directly. Only interface it via PluggableTextMorph and there use hResizing and vResizing. I think. From the top of my hat ðŸ˜…</div>
<div dir="auto"><br>
</div>
<div dir="auto">wrapFlag and autoFit might interfere with each other unexpectedly.</div>
<div dir="auto"><br>
</div>
<div dir="auto">If this does not solve the issue, I will take another look at the code there next week. ðŸ™ƒ Sorry for the inconvenience.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Best,</div>
<div dir="auto">Marcel</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>From:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> on behalf of karl ramberg <karlramberg@gmail.com><br>
<b>Sent:</b> Saturday, March 11, 2023 4:13:56 PM<br>
<b>To:</b> The general-purpose Squeak developers list <squeak-dev@lists.squeakfoundation.org><br>
<b>Subject:</b> Re: [squeak-dev] [BUG] TextMorphForEditView wrapFlag</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Sat, Mar 11, 2023 at 3:58 PM Eduardo Ochs <<a href="mailto:eduardoochs@gmail.com">eduardoochs@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">Thanks for working in this! =)
<div>  Cheers,</div>
<div>    Eduardo</div>
</div>
</blockquote>
<div><br>
</div>
<div>It's quite fun trying to fix these issues :-)</div>
<div><br>
</div>
<div>Additionally to my posted fix I think that turning text wrapping off should turn on horizontal scrollbar.</div>
<div><br>
</div>
<div>Best,</div>
<div>Karl</div>
<div> <br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Sat, 11 Mar 2023 at 11:48, karl ramberg <<a href="mailto:karlramberg@gmail.com" target="_blank">karlramberg@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>Attached is a change set that fixes turning text wrapFlag both on and off in TextMorphForEditView.</div>
<div>I'm not familiar with the inner workings of these methods to say they are the correct fixes.</div>
<div>The end result looks right but implementation is maybe a little clumsy.<br>
</div>
<div><br>
</div>
<div>Best,</div>
<div>Karl<br>
</div>
<div><br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Sat, Mar 11, 2023 at 10:44 AM karl ramberg <<a href="mailto:karlramberg@gmail.com" target="_blank">karlramberg@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>When a you turn preference wrapFlag off in TextMorphForEditViewyou get <br>
</div>
<div>Assertion failure in Morph>>#doLayoutIn:</div>
<div>...</div>
<div>"2.2) Do one additional run on the layout if requested in #layoutInBounds:."<br>
(self hasProperty: #doLayoutAgain) ifTrue: [<br>
self removeProperty: #doLayoutAgain. <br>
layout flushLayoutCache.<br>
layout layout: self in: layoutBounds].<br>
self assert: (self hasProperty: #doLayoutAgain) not].</div>
<div>...</div>
<div><br>
</div>
<div>But redoing the layout can add the property #doLayoutAgain. </div>
<div>I think this has to be changed to :</div>
<div>...<br>
</div>
<div>"2.2) Do one additional run on the layout if requested in #layoutInBounds:."<br>
(self hasProperty: #doLayoutAgain) ifTrue: [<br>
layout flushLayoutCache.<br>
layout layout: self in: layoutBounds.<br>
self removeProperty: #doLayoutAgain.].<br>
self assert: [(self hasProperty: #doLayoutAgain) not]].</div>
<div>...</div>
<div><br>
</div>
<div><br>
</div>
<div>Best,</div>
<div>Karl<br>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
</div>
<br>
</blockquote>
</div>
</div>
</div>
</body>
</html>