<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 31, 2014 at 5:38 AM, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Introducing new dependencies on Sensor is bad practice.  We should stick to the event mechanism.</div></blockquote>
<div><br></div><div>No shit.  But events are not passed throguh to dispatched menu picks AFAICT.  If there&#39;s a way to get the event that resulted in the menu pick I&#39;m all ears.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><br></div><div>I&#39;m not sure what you&#39;re trying to do, but did you know we already have AlternatePluggableListMorphOfMany which implements extending selection via Shift key..?</div></div></blockquote>
<div><br></div><div>The ChangeList doesn&#39;t work that way.  It has its own internal boolean array of selected elements.  In any case this is about computing a set of selections, not toggling a single selection.  The point being that computing a set of selections can either select that set, or add that set to the existing set of selections.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 31, 2014 at 12:46 AM,  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Eliot Miranda uploaded a new version of Tools to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Tools-eem.526.mcz" target="_blank">http://source.squeak.org/trunk/Tools-eem.526.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Tools-eem.526<br>
Author: eem<br>
Time: 30 July 2014, 7:46:31.551 pm<br>
UUID: 458dab1f-dc91-4197-88d2-076aa9c7317b<br>
Ancestors: Tools-eem.525<br>
<br>
Allow extending selection via shift in ChangeList&gt;&gt;selectMethodsForThisClass.<br>
Allow a class to specify its own integer base preference in<br>
the inspector and debugger.<br>
<br>
=============== Diff against Tools-eem.525 ===============<br>
<br>
Item was changed:<br>
  ----- Method: ChangeList&gt;&gt;selectMethodsForThisClass (in category &#39;menu actions&#39;) -----<br>
  selectMethodsForThisClass<br>
-       | name |<br>
        self currentChange ifNil: [ ^self ].<br>
+       self currentChange methodClassName ifNotNil:<br>
+               [:name|<br>
+               self selectSuchThat:<br>
+                       (Sensor leftShiftDown<br>
+                               ifTrue: [[:change :index| (listSelections at: index) or: [change methodClassName = name]]]<br>
+                               ifFalse: [[:change| change methodClassName = name]])]!<br>
-       name := self currentChange methodClassName.<br>
-       name ifNil: [ ^self ].<br>
-       ^self selectSuchThat: [ :change |<br>
-               change methodClassName = name ].!<br>
<br>
Item was changed:<br>
  ----- Method: ChangeList&gt;&gt;selectSuchThat: (in category &#39;menu actions&#39;) -----<br>
  selectSuchThat: aBlock<br>
        &quot;select all changes for which block returns true&quot;<br>
+       listSelections := aBlock numArgs = 2<br>
+                                               ifTrue: [changeList withIndexCollect: aBlock]<br>
+                                               ifFalse: [changeList collect: aBlock].<br>
-       listSelections := changeList collect: aBlock.<br>
        self changed: #allSelections!<br>
<br>
Item was added:<br>
+ ----- Method: ContextVariablesInspector&gt;&gt;defaultIntegerBase (in category &#39;selecting&#39;) -----<br>
+ defaultIntegerBase<br>
+       &quot;Answer the default base in which to print integers.<br>
+        Defer to the class the code is compiled in.&quot;<br>
+       ^[object method methodClass defaultIntegerBaseInDebugger]<br>
+               on: MessageNotUnderstood<br>
+               do: [:ex| 10]!<br>
<br>
Item was added:<br>
+ ----- Method: Inspector&gt;&gt;defaultIntegerBase (in category &#39;selecting&#39;) -----<br>
+ defaultIntegerBase<br>
+       &quot;Answer the default base in which to print integers.<br>
+        Defer to the class of the instance.&quot;<br>
+       ^[object class defaultIntegerBaseInDebugger]<br>
+               on: MessageNotUnderstood<br>
+               do: [:ex| 10]!<br>
<br>
Item was changed:<br>
  ----- Method: Inspector&gt;&gt;selectionPrintString (in category &#39;selecting&#39;) -----<br>
  selectionPrintString<br>
        | text |<br>
+       selectionUpdateTime := [text := [self selection isInteger<br>
+                                                                               ifTrue: [self selection storeStringBase: self defaultIntegerBase]<br>
+                                                                               ifFalse: [self selection printStringLimitedTo: 5000]]<br>
-       selectionUpdateTime := [text := [(self selection printStringLimitedTo: 5000) asText]<br>
                                                on: Error<br>
                                                do: [text := self printStringErrorText.<br>
                                                        text<br>
                                                                addAttribute: TextColor red<br>
                                                                from: 1<br>
                                                                to: text size.<br>
                                                        text]] timeToRun.<br>
        ^ text!<br>
<br>
<br>
</blockquote></div><br></div>
</div></div><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>