<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"><<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>></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>
> On 31.05.2016, at 23:58, Chris Muller <<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>> wrote:<br>
><br>
> By "everywhere" I assume you mean the ones just inside my brackets?<br>
> When block arguments are written without a space between the colon and<br>
> variable name, like this:<br>
><br>
> coll do: [:each|each do something]<br>
><br>
> then I can't simply double-click the "each" declaration and then use<br>
> Cmd+g to find further occurrences, because double-clicking it also<br>
> selects the colon.<br>
><br>
> So, I could write:<br>
><br>
> coll do: [: each|each do something]<br>
><br>
> but it looks strange to me.<br>
><br>
> But also for easier expression editing. With no space, it is harder<br>
> to select the inner expression via double clicking just inside the<br>
> opening bracket; because a space there affords the user more width to<br>
> hit the expression than the narrow colon.<br>
><br>
> This effect can be verified on a computer with touch pad with<br>
> **separate buttons** (e.g., able to double-click without moving the<br>
> mouse even one pixel). 1) put a space there, 2) place mouse about<br>
> halfway into width of the space. 3) Without touching touch pad,<br>
> double-click to ensure expression is selected. 4) Now single-click to<br>
> deselect expression. 5) Now press [Delete] to delete the space. 6)<br>
> Without touching touch pad, again double-click in the exact same spot.<br>
> The colon is selected instead of the expression.<br>
><br>
> On Tue, May 31, 2016 at 4:42 PM, Tobias Pape <<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>> wrote:<br>
>><br>
>> On 31.05.2016, at 21:26, <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:<br>
>><br>
>><br>
>>> Item was changed:<br>
>>> ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category 'drawing') -----<br>
>>> + drawBalloonTextOn: aCanvas<br>
>>> - drawBalloonTextOn: aCanvas<br>
>>> "Show balloon text in the text morph if it has no contents."<br>
>>> + textMorph contents ifNotEmpty: [ ^ self ].<br>
>>> + ([ self balloonText ]<br>
>>> + on: Error<br>
>>> + do: [ : err | 'error in balloonText' ]) ifNotNil:<br>
>>> + [ : text | aCanvas<br>
>>> -<br>
>>> - textMorph contents ifNotEmpty: [^ self].<br>
>>> -<br>
>>> - self balloonText ifNotNil: [:text |<br>
>>> - aCanvas<br>
>>> drawString: text<br>
>>> + in: (self innerBounds insetBy: (5 @ 2 corner: 0 @ 0))<br>
>>> + font: textMorph textStyle defaultFont "I want italic here"<br>
>>> + color: (Color gray: 0.7) ]!<br>
>>> - in: (self innerBounds insetBy: (5@2 corner: 0@0))<br>
>>> - font: textMorph textStyle defaultFont<br>
>>> - color: (Color gray: 0.7)].!<br>
>><br>
>> Just curious, why are you adding spaces everywhere?<br>
>> :)<br>
>> Best regards<br>
>> -toibas<br>
><br>
<br>
<br>
<br><br>
<br></blockquote></div><br></div></div>