Skip to content

Commit

Permalink
Some refactorings, error fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeAtHPI committed Apr 23, 2024
1 parent 4d6b8a2 commit 99fc942
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packages/Sandblocks-Babylonian/SBMultiverse.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ SBMultiverse >> cleanUp [
(watches select: [:anOpenWatch | anOpenWatch containingArtefact isNil]) copy do: #delete.
watches select: #isInEditor thenDo: [:aWatch | aWatch exampleToDisplay values do: #updateDisplay].
allMethodBlocksContainingWatches do: [:aMethodBlock |
(aMethodBlock valueOfProperty: #originals) do: [:aWatch| aWatch ignoreReports: true]].
(aMethodBlock valueOfProperty: #originals) do: [:aWatch| aWatch ignoreReports: false]].
]

{ #category : #collecting }
Expand Down
4 changes: 2 additions & 2 deletions packages/Sandblocks-Core/Collection.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Collection >> asBarChart: converter [
<convert>

converter
if: [self isString not and: [self isDictionary not and: [self allSatisfy: SBBarChart supportedInterface]]]
if: [self isString not and: [self allSatisfy: SBBarChart supportedInterface]]
do: [SBBarChart newWithValues: self]
]

Expand All @@ -23,7 +23,7 @@ Collection >> asLineChart: converter [
<convert>

converter
if: [self isString not and: [self isDictionary not and: [self allSatisfy: SBLineChart supportedInterface]]]
if: [self isString not and: [self allSatisfy: SBLineChart supportedInterface]]
do: [SBLineChart newWithValues: self]
]

Expand Down
16 changes: 0 additions & 16 deletions packages/Sandblocks-Smalltalk/SBStGrammarHandler.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -462,22 +462,6 @@ SBStGrammarHandler >> useThirdArgument [
self useArgument: 3
]
{ #category : #'action helpers' }
SBStGrammarHandler >> variantNameFor: aCollectionOfBlocks in: aParentBlock [
aParentBlock sandblockEditor = aParentBlock ifTrue: [^ aCollectionOfBlocks printString].
aParentBlock isTopLevel ifTrue: [^ aParentBlock printString].
aParentBlock isMessageSend ifTrue: [^ aCollectionOfBlocks first submorphBefore printString].
(aParentBlock isAssignment and: [aParentBlock receiver isVariant not]) ifTrue: [^ aParentBlock receiver sourceString, ' := '].
aCollectionOfBlocks size = 1 ifTrue: [^ aCollectionOfBlocks first sourceString].
^ '{1}' format: {(aCollectionOfBlocks collect: [:aBlock | aBlock sourceString])
fold: [:a :b | a, ', ', Character cr, b ]}
]
{ #category : #'action helpers' }
SBStGrammarHandler >> variantNameFor: aCollectionOfBlocks in: aParentBlock preceedingBlock: aNeighbor [
Expand Down
2 changes: 1 addition & 1 deletion packages/Sandblocks-Smalltalk/SBVariant.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ SBVariant class >> named: aString associations: aCollectionOfAssociations active

requestor := thisContext sender receiver.
"The requesting object does not require dynamic update behavior in which it needs to know a certain alternative"
SBExploriants objectToPermutation at: (requestor := thisContext sender receiver) ifAbsent: [^ defaultBehavior value].
SBExploriants objectToPermutation at: requestor ifAbsent: [^ defaultBehavior value].
"The permutation is outdated and does not know this variant"
(requiredPermutation := SBExploriants objectToPermutation at: requestor) at: uuid ifAbsent: [^ defaultBehavior value].
"An outdated permutation in which an alternative with a higher index than current has been deleted"
Expand Down

0 comments on commit 99fc942

Please sign in to comment.