[squeak-dev] The Inbox: Protocols-jr.90.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Aug 28 20:51:08 UTC 2022


A new version of Protocols was added to project The Inbox:
http://source.squeak.org/inbox/Protocols-jr.90.mcz

==================== Summary ====================

Name: Protocols-jr.90
Author: jr
Time: 28 August 2022, 10:51:08.187406 pm
UUID: d7bf715f-430d-594c-8866-15cebe2d8c7f
Ancestors: Protocols-jr.89

Fix "-- active --" pseudo category and "recent" menu item. Convert MessageNavigation to a collection of selectors before initializing the message list from it.

=============== Diff against Protocols-jr.89 ===============

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

Item was changed:
  ----- Method: Lexicon>>navigateToRecentMethod (in category 'history') -----
  navigateToRecentMethod
  	"Put up a menu of recent selectors visited and navigate to the one chosen"
  
  	| visited aSelector |
+ 	(visited := self selectorsVisited asCollection) size > 1 ifTrue:
- 	(visited := self selectorsVisited) size > 1 ifTrue:
  		[visited := visited copyFrom: 1 to: (visited size min: 20).
  		aSelector := UIManager default chooseFrom: visited values: visited 
  			title: 'Recent methods visited in this browser'.
  		aSelector isEmptyOrNil ifFalse: [self displaySelector: aSelector]]!

Item was changed:
  ----- Method: Lexicon>>selectorsVisited (in category 'history') -----
  selectorsVisited
+ 	"Answer the navigation object of this tool"
- 	"Answer the list of selectors visited in this tool"
  	selectorsVisited ifNil: [selectorsVisited := MessageNavigation new].
  	(selectorsVisited isMemberOf: OrderedCollection)
  		ifTrue: "migrate old instances"
  			[| new | new := MessageNavigation new.
  			selectorsVisited do: [:each | new current: each].
  			selectorsVisited := new].
  	^ selectorsVisited!



More information about the Squeak-dev mailing list