<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 1, 2016 at 12:47 PM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The predominant style in Squeak historically has been<br>
<br>
        coll do: [:each | each do something]<br>
<br>
Ken Beck uses that in his “Best Practice Patterns” too. It’s also produced by our formatter (but we rarely use that because it introduces weird line breaks).<br>
<br>
I prefer this style because it seems to be most readable.<br>
<br>
I agree with Chris about selectability, but I’d rather fix our double-click selection logic than make the code look weird. Double-clicking on “:foo” should only select “foo”.<br>
<br>
- Bert -<br></blockquote><div><br></div><div>Or search could ignore leading colon</div><div><br></div><div>Best,</div><div>Karl </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
&gt; On 31.05.2016, at 23:58, Chris Muller &lt;<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; By &quot;everywhere&quot; I assume you mean the ones just inside my brackets?<br>
&gt; When block arguments are written without a space between the colon and<br>
&gt; variable name, like this:<br>
&gt;<br>
&gt;   coll do: [:each|each do something]<br>
&gt;<br>
&gt; then I can&#39;t simply double-click the &quot;each&quot; declaration and then use<br>
&gt; Cmd+g to find further occurrences, because double-clicking it also<br>
&gt; selects the colon.<br>
&gt;<br>
&gt; So, I could write:<br>
&gt;<br>
&gt;    coll do: [: each|each do something]<br>
&gt;<br>
&gt; but it looks strange to me.<br>
&gt;<br>
&gt; But also for easier expression editing.  With no space, it is harder<br>
&gt; to select the inner expression via double clicking just inside the<br>
&gt; opening bracket; because a space there affords the user more width to<br>
&gt; hit the expression than the narrow colon.<br>
&gt;<br>
&gt; This effect can be verified on a computer with touch pad with<br>
&gt; **separate buttons** (e.g., able to double-click without moving the<br>
&gt; mouse even one pixel).  1) put a space there, 2) place mouse about<br>
&gt; halfway into width of the space.  3) Without touching touch pad,<br>
&gt; double-click to ensure expression is selected.  4) Now single-click to<br>
&gt; deselect expression.  5) Now press [Delete] to delete the space.  6)<br>
&gt; Without touching touch pad, again double-click in the exact same spot.<br>
&gt; The colon is selected instead of the expression.<br>
&gt;<br>
&gt; On Tue, May 31, 2016 at 4:42 PM, Tobias Pape &lt;<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 31.05.2016, at 21:26, <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; Item was changed:<br>
&gt;&gt;&gt; ----- Method: PluggableTextMorphPlus&gt;&gt;drawBalloonTextOn: (in category &#39;drawing&#39;) -----<br>
&gt;&gt;&gt; + drawBalloonTextOn: aCanvas<br>
&gt;&gt;&gt; - drawBalloonTextOn: aCanvas<br>
&gt;&gt;&gt;      &quot;Show balloon text in the text morph if it has no contents.&quot;<br>
&gt;&gt;&gt; +     textMorph contents ifNotEmpty: [ ^ self ].<br>
&gt;&gt;&gt; +     ([ self balloonText ]<br>
&gt;&gt;&gt; +             on: Error<br>
&gt;&gt;&gt; +             do: [ : err | &#39;error in balloonText&#39; ]) ifNotNil:<br>
&gt;&gt;&gt; +             [ : text | aCanvas<br>
&gt;&gt;&gt; -<br>
&gt;&gt;&gt; -     textMorph contents ifNotEmpty: [^ self].<br>
&gt;&gt;&gt; -<br>
&gt;&gt;&gt; -     self balloonText ifNotNil: [:text |<br>
&gt;&gt;&gt; -             aCanvas<br>
&gt;&gt;&gt;                      drawString: text<br>
&gt;&gt;&gt; +                     in: (self innerBounds insetBy: (5 @ 2 corner: 0 @ 0))<br>
&gt;&gt;&gt; +                     font: textMorph textStyle defaultFont &quot;I want italic here&quot;<br>
&gt;&gt;&gt; +                     color: (Color gray: 0.7) ]!<br>
&gt;&gt;&gt; -                     in: (self innerBounds insetBy: (5@2 corner: 0@0))<br>
&gt;&gt;&gt; -                     font: textMorph textStyle defaultFont<br>
&gt;&gt;&gt; -                     color: (Color gray: 0.7)].!<br>
&gt;&gt;<br>
&gt;&gt; Just curious, why are you adding spaces everywhere?<br>
&gt;&gt; :)<br>
&gt;&gt; Best regards<br>
&gt;&gt;        -toibas<br>
&gt;<br>
<br>
<br>
<br><br>
<br></blockquote></div><br></div></div>