[squeak-dev] The Trunk: Protocols-jr.71.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Mar 5 20:26:30 UTC 2020

Nicolas Cellier uploaded a new version of Protocols to project The Trunk:

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

Name: Protocols-jr.71
Author: jr
Time: 8 February 2020, 4:11:06.177789 pm
UUID: 705d6a77-0b95-1147-9bd9-68f9cab27c59
Ancestors: Protocols-jr.70

Fix the 'follow' button for inherited methods.

=============== Diff against Protocols-jr.70 ===============

Item was changed:
  ----- Method: Lexicon>>selectImplementedMessageAndEvaluate: (in category 'selection') -----
  selectImplementedMessageAndEvaluate: aBlock
  	"Allow the user to choose one selector, chosen from the currently selected message's selector, as well as those of all messages sent by it, and evaluate aBlock on behalf of chosen selector.  If there is only one possible choice, simply make it; if there are multiple choices, put up a menu, and evaluate aBlock on behalf of the the chosen selector, doing nothing if the user declines to choose any.  In this variant, only selectors "
  	| selector method messages |
  	(selector := self selectedMessageName) ifNil: [^ self].
  	method := (self selectedClassOrMetaClass ifNil: [^ self])
+ 		lookupSelector: selector.
- 		compiledMethodAt: selector
- 		ifAbsent: [].
  	(method isNil or: [(messages := method messages) size = 0])
  		 ifTrue: [^ aBlock value: selector].
  	(messages size = 1 and: [messages includes: selector])
  			[^ aBlock value: selector].  "If only one item, there is no choice"
  	messages := messages select: [:aSelector | currentVocabulary includesSelector: aSelector forInstance: self targetObject ofClass: targetClass limitClass: limitClass].
  	self systemNavigation 
  		showMenuOf: messages
  		withFirstItem: selector
  		ifChosenDo: aBlock!

More information about the Squeak-dev mailing list