Christoph Thiede uploaded a new version of Protocols to project The Inbox:
http://source.squeak.org/inbox/Protocols-ct.79.mcz==================== Summary ====================
Name: Protocols-ct.79
Author: ct
Time: 2 March 2021, 3:54:08.19017 pm
UUID: e33c4359-8d90-8e4f-9c3d-b2ed45ee3ac9
Ancestors: Protocols-mt.77
In the protocol lexicon, fall back to the "all" category if no certain protocol is selected.
=============== Diff against Protocols-mt.77 ===============
Item was changed:
----- Method: Lexicon>>categoryListIndex: (in category 'category list') -----
categoryListIndex: anIndex
"Set the category list index as indicated"
| categoryName aList found existingSelector |
existingSelector := self selectedMessageName.
categoryListIndex := anIndex.
+ categoryName := anIndex > 0
- anIndex > 0
ifTrue:
+ [categoryList at: anIndex]
- [categoryName := categoryList at: anIndex]
ifFalse:
+ [categoryList last "self class allCategoryName"].
- [contents := nil].
self changed: #categoryListIndex.
found := false.
#( (viewedCategoryName selectorsVisited)
(queryCategoryName selectorsRetrieved)) do:
[:pair |
categoryName = (self class perform: pair first)
ifTrue:
[aList := self perform: pair second.
found := true]].
found ifFalse:
[aList := currentVocabulary allMethodsInCategory: categoryName forInstance: self targetObject ofClass: targetClass].
categoryName = self class queryCategoryName ifFalse: [autoSelectString := nil].
self initListFrom: aList highlighting: targetClass.
messageListIndex := 0.
self changed: #messageList.
contents := nil.
self contentsChanged.
self selectWithinCurrentCategoryIfPossible: existingSelector.
self adjustWindowTitle!