Skip to content

Commit

Permalink
Merge 161636e into 443c9fc
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyranix committed Jul 16, 2021
2 parents 443c9fc + 161636e commit 4ab13e3
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ default morphs
changeCurrentMorph: aMorph

self currentMorph: aMorph.
self selectedMethods: (self defaultMorphs at: aMorph).
self deselectAllMethods.
(self defaultMorphs at: aMorph) do: [:aMethod | self setSelectionFor: aMethod with: true].
self playground updateContents: aMorph.
self changed: #selectedMethods
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
deselectAllMethods

self selectedMethods do: [:aMethod | self setSelectionFor: aMethod with: false]
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
"buildSaveDefaultMorphButtonWith:" : "TB 5/13/2021 15:31",
"category" : "FFN 5/9/2019 10:09",
"category:" : "FFN 5/9/2019 10:09",
"changeCurrentMorph:" : "SC 7/5/2021 19:29",
"changeCurrentMorph:" : "SC 7/10/2021 18:36",
"changeToOverView" : "TB 6/23/2021 19:07",
"createDefaultMorphBox" : "PC 6/17/2021 17:47",
"createMorphPlayground" : "FFN 7/6/2019 23:49",
"currentMorph" : "TB 6/23/2021 18:54",
"currentMorph:" : "TB 6/23/2021 20:07",
"currentMorphClass" : "TB 6/23/2021 18:57",
"defaultMorphs:" : "SH 5/20/2021 13:30",
"deselectAllMethods" : "SC 7/10/2021 18:38",
"evaluateCode:" : "jb 7/24/2019 14:09",
"evaluateMethodsForMorph:" : "SH 5/20/2021 17:28",
"fillMorphBox" : "SC 7/5/2021 19:18",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
running
loadMorphWithMethods: anOrderedCollection

anOrderedCollection do: [:aMethod | explorationView setSelectionFor: aMethod with: true].
explorationView evaluateMethodsForMorph: explorationView defaultMorph
anOrderedCollection do: [:aMethod | explorationView setSelectionFor: aMethod with: true]
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
tests
testMethodSelectionUpdatesOnChangingMorphInPlayground

"| exampleMethods allButtonMorphs |
| exampleMethods allButtonMorphs view methodTree |

view := builder build: explorationView.
view openInWorld.
exampleMethods := {explorationView methodList at: 1. explorationView methodList at: 2} asOrderedCollection.

self loadMorphWithMethods: exampleMethods.
explorationView evaluateCode: self sampleCode.
explorationView saveCurrentMorph.
allButtonMorphs := self getButtonMorphCollectionInDefaultMorphBoxFor: explorationView.
(allButtonMorphs at: 1) doButtonAction"
methodTree := self getMethodTreeFor: explorationView.
allButtonMorphs do: [:aButtonMorph | aButtonMorph doButtonAction.
self assert: (((((methodTree items collect: [:anItem | anItem complexContents item isSelected == false]) occurrencesOf: false) == 0)
and: (methodTree selectedMorphs size == 0))
or: ((methodTree items first complexContents item isSelected)
and: (methodTree items second complexContents item isSelected)
and: ((((methodTree items allButFirst: 2) collect: [:anItem | anItem complexContents item isSelected == false]) occurrencesOf: false) == 0)
and: (methodTree selectedMorphs size == 2)))].
view abandon
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"getButtonMorphCollectionInDefaultMorphBoxFor:" : "SC 7/5/2021 03:56",
"getMethodTreeFor:" : "SH 6/10/2021 19:20",
"getMorphCollectionInDefaultMorphBoxFor:" : "SC 6/29/2021 05:07",
"loadMorphWithMethods:" : "SC 6/29/2021 04:54",
"loadMorphWithMethods:" : "SC 7/10/2021 19:10",
"newMorphs" : "lk 7/24/2019 15:03",
"sampleCode" : "SC 6/29/2021 04:50",
"setUp" : "lk 7/24/2019 16:15",
Expand All @@ -19,10 +19,10 @@
"testDependeeMorphDisplaysCorrectIcon" : "SC 6/21/2021 13:01",
"testDependentMorphDisplaysCorrectIcon" : "SC 6/21/2021 13:03",
"testEvaluateCodeReturnsCorrectMorph" : "lk 7/24/2019 15:00",
"testExpandableTreeElementsExpanded" : "PM 7/16/2021 10:10",
"testMethodSelectionUpdatesOnChangingMorphInPlayground" : "SC 7/5/2021 04:18",
"testMorphBoxContainsStandardMorphs" : "PM 7/16/2021 10:10",
"testMorphSpacing" : "PM 7/16/2021 10:11",
"testExpandableTreeElementsExpanded" : "SC 6/28/2021 17:13",
"testMethodSelectionUpdatesOnChangingMorphInPlayground" : "SC 7/10/2021 19:35",
"testMorphBoxContainsStandardMorphs" : "TB 6/7/2021 12:04",
"testMorphSpacing" : "PC 6/25/2021 14:27",
"testOpenExplorationViewForOpensAnExplorationView" : "FFN 5/21/2019 16:23",
"testPlaygroundContainsCorrectMorph" : "TB 6/23/2021 19:57",
"testRelatedMorphsAreDependeeMorphs" : "SH 6/10/2021 20:02",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ testCategoryButtonToExplorationView
aMorph isKindOf: MEXPluggableButtonMorph])
select: [:aMorph | aMorph label isKindOf: MEXScalableImageMorph]) first performAction.
self assert: ((self getOpenWindowsWithModel: MEXToolExplorationView) size = (openExplorationViews + 1)).
self assert: ((self getOpenWindowsWithModel: MEXToolOverView) size = (openOverViews - 1))
self assert: ((self getOpenWindowsWithModel: MEXToolOverView) size = (openOverViews - 1)).
view abandon

0 comments on commit 4ab13e3

Please sign in to comment.