[Pkg] The Trunk: ToolBuilder-Morphic-mt.115.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Apr 2 06:54:16 UTC 2015
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.115.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.115
Author: mt
Time: 2 April 2015, 8:54:11.711 am
UUID: 873458fe-19e8-0449-a9d1-c52476bc1077
Ancestors: ToolBuilder-Morphic-cmm.114
Revert something that was re-introduced in cmm.112 but already reverted before.
#selectPath:in: must send #setSelectedMorph: because both are callbacks from #update: within the tree morph.
#selection only talks to the model. We do not have an equivalent for tree-path selection, which talks to the model, yet.
=============== Diff against ToolBuilder-Morphic-cmm.114 ===============
Item was changed:
----- Method: PluggableTreeMorph>>selectPath:in: (in category 'selection') -----
selectPath: path in: listItem
+ path isEmpty ifTrue: [^self setSelectedMorph: nil].
- path isEmpty ifTrue: [^self selection: nil].
-
listItem withSiblingsDo: [:each |
(each complexContents item = path first) ifTrue: [
each isExpanded ifFalse: [
each toggleExpandedState.
self adjustSubmorphPositions.
].
each changed.
path size = 1 ifTrue: [
+ ^self setSelectedMorph: each
- ^self selection: each complexContents
].
+ each firstChild ifNil: [^self setSelectedMorph: nil].
- each firstChild ifNil: [^self selection: nil].
^self selectPath: path allButFirst in: each firstChild
].
].
+ ^self setSelectedMorph: nil
- ^self selection: nil
!
Item was changed:
----- Method: PluggableTreeMorph>>setSelectedMorph: (in category 'selection') -----
setSelectedMorph: aMorph
selectedWrapper := aMorph complexContents.
+
"Let the model now about the selected object, not wrapper."
setSelectionSelector ifNotNil: [:symbol |
model
perform: symbol
+ with: (selectedWrapper ifNotNil: [:w | w item])].
+
- with: (selectedWrapper ifNotNil: [ selectedWrapper item ])].
"The model may not have access to the parent object in terms of this tree structure."
setSelectedParentSelector ifNotNil: [:symbol |
model
perform: symbol
+ with: (selectedWrapper ifNotNil: [:w | w parent ifNotNil: [:pw | pw item]])].!
- with: (selectedWrapper ifNotNil: [selectedWrapper parent ifNotNil: [: parentWrapper | parentWrapper item]])].!
More information about the Packages
mailing list