[squeak-dev] The Trunk: HelpSystem-Core-tpr.141.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 16 00:34:17 UTC 2023


tim Rowledge uploaded a new version of HelpSystem-Core to project The Trunk:
http://source.squeak.org/trunk/HelpSystem-Core-tpr.141.mcz

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

Name: HelpSystem-Core-tpr.141
Author: tpr
Time: 15 January 2023, 4:32:40.429833 pm
UUID: 78bb8fe9-1e02-46b5-9778-b54f49ca2685
Ancestors: HelpSystem-Core-mt.140

Remove some variable shadowing

=============== Diff against HelpSystem-Core-mt.140 ===============

Item was changed:
  ----- Method: ClassBasedHelpTopic>>updateSubtopics (in category 'updating') -----
  updateSubtopics
  	"build a list of subtopics; start with the list of page names specified by the helpClass' #pages method, remembering that it is an ordered list of 
  	 - selectors that return a HelpTopic,
  	-  or the name of a class that must in turn provide help topics etc. This allows for hierarchies with 'subtrees in the middle'.
  	The order of the pages reflects the order of the selectors and class names given.
  	Then all the subclasses that are not #ignore'd and not already included are added.
  	Finally the list of class names and messages is used to assemble the actual help topics.
  	
  	Questions: 
  		is it actually useful to include the possibility of class names as per the CustomHelpHelpBuilder>createTopicFrom: code?
  		is the #ignore testing worth keeping?"
  		
  	| pages |
  	pages := (self helpClass pages collect: [:pageSelectorOrClassName |
  		(Smalltalk hasClassNamed: pageSelectorOrClassName asString)
  			ifTrue: [Smalltalk classNamed: pageSelectorOrClassName asString]
  			ifFalse: [pageSelectorOrClassName]]) asOrderedCollection.
  
  	self helpClass subclasses
  		select: [:cls | cls ignore not]
  		thenDo: [:cls | pages addIfNotPresent: cls].	
  
+ 	^ subtopics := pages withIndexCollect: [:pageSelectorOrClass :pagePriority |
- 	^ subtopics := pages withIndexCollect: [:pageSelectorOrClass :priority |
  		pageSelectorOrClass isBehavior
  			ifFalse: [(self helpClass perform: pageSelectorOrClass)
+ 							priority: pagePriority - pages size;
- 							priority: priority - pages size;
  							key: pageSelectorOrClass;
  							in: [:topic |
  								"Use my choice of styling if my subtopics do not care."
  								topic shouldStyle ifNil: [topic shouldStyle: self usesCodeStyling]];
  							yourself]
  			ifTrue: [pageSelectorOrClass asHelpTopic]]!



More information about the Squeak-dev mailing list