<div dir="auto">Nice. Had the same in my image but apparently forgot to send it in.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"> <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> schrieb am Di., 7. Mai 2019, 12:09:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Patrick Rein uploaded a new version of Protocols to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Protocols-pre.62.mcz" rel="noreferrer noreferrer" target="_blank">http://source.squeak.org/trunk/Protocols-pre.62.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Protocols-pre.62<br>
Author: pre<br>
Time: 7 May 2019, 12:09:35.44983 pm<br>
UUID: db63a735-b9ea-6442-9048-022830af513e<br>
Ancestors: Protocols-cmm.61<br>
<br>
Replaces calls to the deprecated #upTo: with #copyUpTo: in the lexicon browser<br>
<br>
=============== Diff against Protocols-cmm.61 ===============<br>
<br>
Item was changed:<br>
  ----- Method: Lexicon>>displaySelector: (in category 'basic operation') -----<br>
  displaySelector: aSelector<br>
        "Set aSelector to be the one whose source shows in the browser.  If there is a category list, make it highlight a suitable category"<br>
<br>
        | detectedItem messageIndex |<br>
        self chooseCategory: (self categoryDefiningSelector: aSelector).<br>
        detectedItem := messageList detect:<br>
+               [:anItem | (anItem asString copyUpTo: Character space) asSymbol == aSelector] ifNone: [^ Beeper beep].<br>
-               [:anItem | (anItem asString upTo: $ ) asSymbol == aSelector] ifNone: [^ Beeper beep].<br>
        messageIndex := messageList indexOf: detectedItem.<br>
        self messageListIndex: messageIndex!<br>
<br>
Item was changed:<br>
  ----- Method: Lexicon>>selectSelectorItsNaturalCategory: (in category 'selection') -----<br>
  selectSelectorItsNaturalCategory: aSelector<br>
        "Make aSelector be the current selection of the receiver, with the category being its home category."<br>
<br>
        | cat catIndex detectedItem |<br>
        cat := self categoryOfSelector: aSelector.<br>
        catIndex := categoryList indexOf: cat ifAbsent:<br>
                ["The method's own category is not seen in this browser; the method probably occurs in some other category not known directly to the class, but for now, we'll just use the all category"<br>
                1].<br>
        self categoryListIndex: catIndex.<br>
        detectedItem := messageList detect:<br>
+               [:anItem | (anItem asString copyUpTo: Character space) asSymbol == aSelector] ifNone: [^ self].<br>
-               [:anItem | (anItem asString upTo: $ ) asSymbol == aSelector] ifNone: [^ self].<br>
        self messageListIndex:  (messageList indexOf: detectedItem ifAbsent: [^ self])!<br>
<br>
Item was changed:<br>
  ----- Method: Lexicon>>selectWithinCurrentCategory: (in category 'selection') -----<br>
  selectWithinCurrentCategory: aSelector<br>
        "If aSelector is one of the selectors seen in the current category, select it"<br>
<br>
        | detectedItem |<br>
        detectedItem := self messageList detect:<br>
+               [:anItem | (anItem asString copyUpTo: Character space) asSymbol == aSelector] ifNone: [^ self].<br>
-               [:anItem | (anItem asString upTo: $ ) asSymbol == aSelector] ifNone: [^ self].<br>
        self messageListIndex:  (messageList indexOf: detectedItem ifAbsent: [^ self])!<br>
<br>
Item was changed:<br>
  ----- Method: Lexicon>>selectorsSendingSelectedSelector (in category 'senders') -----<br>
  selectorsSendingSelectedSelector<br>
        "Assumes lastSendersSearchSelector is already set"<br>
        | selectorSet |<br>
+       autoSelectString := (self lastSendersSearchSelector copyUpTo: $:) asString.<br>
-       autoSelectString := (self lastSendersSearchSelector upTo: $:) asString.<br>
        selectorSet := Set new.<br>
        (self systemNavigation allCallsOn: self lastSendersSearchSelector)<br>
                do: [:anItem | | sel cl | <br>
                        sel := anItem methodSymbol.<br>
                        cl := anItem actualClass.<br>
                        ((currentVocabulary<br>
                                                includesSelector: sel<br>
                                                forInstance: self targetObject<br>
                                                ofClass: targetClass<br>
                                                limitClass: limitClass)<br>
                                        and: [targetClass includesBehavior: cl])<br>
                                ifTrue: [selectorSet add: sel]].<br>
        ^ selectorSet sorted!<br>
<br>
Item was changed:<br>
  ----- Method: Lexicon>>setToShowSelector:selectCategory: (in category 'selection') -----<br>
  setToShowSelector: selectorString selectCategory: aBoolean <br>
        "Set up the receiver so that it will show the given selector"<br>
        | catName catIndex messageIndex aList |<br>
        catName := aBoolean<br>
                ifTrue:<br>
                        [ (aList := currentVocabulary<br>
                                categoriesContaining: selectorString<br>
                                forClass: targetClass)<br>
                                at: 1<br>
                                ifAbsent: [ self class allCategoryName ] ]<br>
                ifFalse: [ self class allCategoryName ].<br>
        catIndex := categoryList<br>
                indexOf: catName<br>
                ifAbsent: [ 1 ].<br>
        self categoryListIndex: catIndex.<br>
        messageList<br>
                detect:<br>
+                       [ : anItem | (anItem copyUpTo: Character space) asString asSymbol == selectorString ]<br>
-                       [ : anItem | (anItem upTo: Character space) asString asSymbol == selectorString ]<br>
                ifFound:<br>
                        [ : detectedItem | messageIndex := messageList indexOf: detectedItem.<br>
                        self messageListIndex: messageIndex ]<br>
                ifNone: [ ^ self ]!<br>
<br>
<br>
</blockquote></div>