<div dir="ltr">This sound good.<div><br></div><div>Karl</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 27, 2015 at 12:34 AM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, Apr 26, 2015 at 04:43:15PM -0500, Chris Muller wrote:<br>
&gt; This assumes I&#39;m only ever building for the world I&#39;m in.  What if I&#39;m<br>
&gt; building MVC widgets to go inside a special window inside my Moprhic<br>
&gt; IDE environment?<br>
&gt;<br>
&gt; Maybe we should ask the &#39;builder&#39; if he&#39;s a kind of MorphicToolBuilder<br>
&gt; rather than asking the global Smalltalk?<br>
<br>
</span>Presumably an MVC version of the font chooser tool would use a<br>
PluggableTextView, which AFAICT does not know how to turn off text<br>
wrapping. But implementing StringHolderView&gt;&gt;wrapFlag: as a no-op for<br>
Morphic compatibility would be harmless.<br>
<br>
So could we implement PluggableTextMorph&gt;&gt;wrapFlag: to pass the flag<br>
to its TextMorph for Morphic, and implement wrapFlag: as a no-op in<br>
StringHolderView for MVC? That would eliminate the need for an #isMorphic<br>
test in FontChooserTool&gt;&gt;buildWith:<br>
<br>
Dave<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
&gt;<br>
&gt; On Sun, Apr 26, 2015 at 2:41 PM,  &lt;<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>&gt; wrote:<br>
&gt; &gt; Karl Ramberg uploaded a new version of Morphic to project The Trunk:<br>
&gt; &gt; <a href="http://source.squeak.org/trunk/Morphic-kfr.934.mcz" target="_blank">http://source.squeak.org/trunk/Morphic-kfr.934.mcz</a><br>
&gt; &gt;<br>
&gt; &gt; ==================== Summary ====================<br>
&gt; &gt;<br>
&gt; &gt; Name: Morphic-kfr.934<br>
&gt; &gt; Author: kfr<br>
&gt; &gt; Time: 26 April 2015, 9:40:34.032 pm<br>
&gt; &gt; UUID: fd9f26f3-4ed1-eb4f-a8ee-0f0270153871<br>
&gt; &gt; Ancestors: Morphic-kfr.933<br>
&gt; &gt;<br>
&gt; &gt; Add a check for morphic environment<br>
&gt; &gt;<br>
&gt; &gt; =============== Diff against Morphic-kfr.933 ===============<br>
&gt; &gt;<br>
&gt; &gt; Item was changed:<br>
&gt; &gt;   ----- Method: FontChooserTool&gt;&gt;buildWith: (in category &#39;toolbuilder&#39;) -----<br>
&gt; &gt;   buildWith: builder<br>
&gt; &gt;         &quot;Create the ui for the browser&quot;<br>
&gt; &gt;         &quot;ToolBuilder open: self&quot;<br>
&gt; &gt;         | windowSpec |<br>
&gt; &gt;         self offerStyleList ifTrue:[<br>
&gt; &gt;                 windowSpec := self buildWindowWith: builder specs: {<br>
&gt; &gt;                         (0@0 corner: 0.4@0.4) -&gt; [self buildFontListWith: builder].<br>
&gt; &gt;                         (0.4@0 corner: 0.8@0.4) -&gt; [self buildStyleListWith: builder].<br>
&gt; &gt;                         (0.8@0 corner: 1.0@0.4) -&gt; [self buildPointSizeListWith: builder].<br>
&gt; &gt;                         (0.0@0.4 corner: 1.0@0.88) -&gt; [self buildPreviewPaneWith: builder].<br>
&gt; &gt;                         (0.0@0.88 corner: 1@1) -&gt; [self buildButtonBarWith: builder].<br>
&gt; &gt;                 }.<br>
&gt; &gt;         ] ifFalse:[<br>
&gt; &gt;                 windowSpec := self buildWindowWith: builder specs: {<br>
&gt; &gt;                         (0@0 corner: 0.7@0.4) -&gt; [self buildFontListWith: builder].<br>
&gt; &gt;   &quot;                     (0.4@0 corner: 0.8@0.4) -&gt; [self buildStyleListWith: builder].&quot;<br>
&gt; &gt;                         (0.7@0 corner: 1.0@0.4) -&gt; [self buildPointSizeListWith: builder].<br>
&gt; &gt;                         (0.0@0.4 corner: 1.0@0.8) -&gt; [self buildPreviewPaneWith: builder].<br>
&gt; &gt;                         (0.0@0.8 corner: 1@1) -&gt; [self buildButtonBarWith: builder].<br>
&gt; &gt;                 }.<br>
&gt; &gt;         ].<br>
&gt; &gt;         windowSpec extent: self initialExtent.<br>
&gt; &gt;         window := builder build: windowSpec.<br>
&gt; &gt;         &quot;Yes, that&#39;s a hack. But it looks ugly with line breaks.&quot;<br>
&gt; &gt; +       Smalltalk isMorphic ifTrue:[(builder widgetAt: #preview) textMorph wrapFlag: false].<br>
&gt; &gt; -       (builder widgetAt: #preview) textMorph wrapFlag: false.<br>
&gt; &gt;         (builder widgetAt: #fontList) scrollSelectionIntoView.<br>
&gt; &gt;         ^window!<br>
&gt; &gt;<br>
&gt; &gt;<br>
<br>
</div></div></blockquote></div><br></div>