[Pkg] The Trunk: Protocols-ul.38.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Aug 4 01:14:21 UTC 2011


Levente Uzonyi uploaded a new version of Protocols to project The Trunk:
http://source.squeak.org/trunk/Protocols-ul.38.mcz

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

Name: Protocols-ul.38
Author: ul
Time: 3 August 2011, 1:51:01.014 am
UUID: e04559d5-f962-f641-8d94-6b34c15c3485
Ancestors: Protocols-cmm.37

Removed unnecessary blocks.

=============== Diff against Protocols-cmm.37 ===============

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])
  		compiledMethodAt: selector
  		ifAbsent: [].
  	(method isNil or: [(messages := method messages) size = 0])
  		 ifTrue: [^ aBlock value: selector].
  	(messages size = 1 and: [messages includes: selector])
  		ifTrue:
  			[^ 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!
- 		ifChosenDo: [:sel | aBlock value: sel]!

Item was changed:
  ----- Method: ScreenedVocabulary>>categoryListForInstance:ofClass:limitClass: (in category 'enumeration') -----
  categoryListForInstance: anObject ofClass: aClass limitClass: mostGenericClass
  	"Answer the category list for the given object/class, considering only code implemented in mostGenericClass and lower"
  
+ 	^(super categoryListForInstance: anObject ofClass: aClass limitClass: mostGenericClass)
+ 		select: categoryScreeningBlock!
- 	^ (super categoryListForInstance: anObject ofClass: aClass limitClass: mostGenericClass) select:
- 		[:aCategory | categoryScreeningBlock value: aCategory]!

Item was changed:
  ----- Method: Vocabulary>>methodInterfaceAt:ifAbsent: (in category 'queries') -----
  methodInterfaceAt: aSelector ifAbsent: aBlock
  	"Answer the vocabulary's method interface for the given selector; if absent, return the result of evaluating aBlock"
  
+ 	^methodInterfaces at: aSelector ifAbsent: aBlock!
- 	^ methodInterfaces at: aSelector ifAbsent: [aBlock value]!



More information about the Packages mailing list