[squeak-dev] The Trunk: Protocols-ct.79.mcz

commits at source.squeak.org commits at source.squeak.org
Thu May 5 17:46:47 UTC 2022

Christoph Thiede uploaded a new version of Protocols to project The Trunk:

==================== 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
+ 			[categoryList at: anIndex]
- 			[categoryName := categoryList at: anIndex]
+ 			[categoryList last "self class allCategoryName"].
- 			[contents := nil].
  	self changed: #categoryListIndex.
  	found := false.
  	#(	(viewedCategoryName		selectorsVisited)
  		(queryCategoryName		selectorsRetrieved)) do:
  			[:pair |
  				categoryName = (self class perform: pair first)
  						[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!

More information about the Squeak-dev mailing list