The Trunk: ToolBuilder-Morphic-topa.188.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: ToolBuilder-Morphic-topa.188.mcz

commits-2
Tobias Pape uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-topa.188.mcz

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

Name: ToolBuilder-Morphic-topa.188
Author: topa
Time: 23 September 2016, 10:27:45.599099 pm
UUID: 5b808207-4f79-42b5-98b8-be4203bb54f2
Ancestors: ToolBuilder-Morphic-mt.187

Make pluggable trees work again with nodes whose children are dictionary-like

=============== Diff against ToolBuilder-Morphic-mt.187 ===============

Item was changed:
  ----- Method: PluggableTreeMorph>>contentsOfNode: (in category 'node access') -----
  contentsOfNode: node
 
  | children |
+ getChildrenSelector ifNil: [^#()].
- getChildrenSelector ifNil:[^#()].
  children := model perform: getChildrenSelector with: node item.
+ ^ self nodesForChildren: children inNode: node
+ !
- ^children collectWithIndex: [:item :index |
- (self nodeClass with: item model: self)
- index: index;
- parent: node]!

Item was added:
+ ----- Method: PluggableTreeMorph>>instantiateNodeWithContents:index:parent: (in category 'node access') -----
+ instantiateNodeWithContents: item index: aNumber parent: anObject
+
+ ^ (self nodeClass with: item model: self)
+ index: aNumber;
+ parent: anObject!

Item was added:
+ ----- Method: PluggableTreeMorph>>nodesForChildren:inNode: (in category 'node access') -----
+ nodesForChildren: aCollection inNode: anObject
+
+ ^ aCollection isSequenceable
+ ifTrue: [aCollection collectWithIndex:
+ [:item :index |
+ self instantiateNodeWithContents: item index: index parent: anObject]]
+ ifFalse: [ | count |
+ count := 0. "artificial index."
+ aCollection collect:
+ [:item |
+ count := count + 1.
+ self instantiateNodeWithContents: item index: count parent: anObject]]!