<div dir="ltr">Hi Marcel,<br><br>what do you think of adding comments like this one<br><br>  Please do not use TextMorphForEditView directly.<br>  Only interface it via PluggableTextMorph...<br><br>to the code? This would help a lot the people like me who are learning<br>Morphic mainly via the explorer and the debugger...<br><br>  Cheers =),<br>    Eduardo Ochs<br><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 11 Mar 2023 at 15:23, Taeumel, Marcel via Squeak-dev <<a href="mailto:squeak-dev@lists.squeakfoundation.org">squeak-dev@lists.squeakfoundation.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
<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%">
<div id="m_5501513109443208486divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>> on behalf of karl ramberg <<a href="mailto:karlramberg@gmail.com" target="_blank">karlramberg@gmail.com</a>><br>
<b>Sent:</b> Saturday, March 11, 2023 4:13:56 PM<br>
<b>To:</b> The general-purpose Squeak developers list <<a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>><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>
<div dir="ltr">On Sat, Mar 11, 2023 at 3:58 PM Eduardo Ochs <<a href="mailto:eduardoochs@gmail.com" target="_blank">eduardoochs@gmail.com</a>> wrote:<br>
</div>
<blockquote 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 style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<div>
<div dir="ltr">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 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>
<div dir="ltr">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 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>
</div>

<br>
</blockquote></div>