Skip to content

Commit

Permalink
move SpTActionContainer to fix a cyclic dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Oct 22, 2023
1 parent 1c49e5e commit 026ec5d
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Trait {
#instVars : [
'actionGroup'
],
#category : 'Spec2-Commander2-Action',
#package : 'Spec2-Commander2',
#tag : 'Action'
#category : 'Spec2-Core-Base',
#package : 'Spec2-Core',
#tag : 'Base'
}

{ #category : 'api - actions' }
Expand Down Expand Up @@ -62,7 +62,12 @@ SpTActionContainer >> addShortcutWith: aBlock [
{ #category : 'private' }
SpTActionContainer >> ensureActionGroup [

^ actionGroup ifNil: [ actionGroup := SpActionGroup new beRoot ]
self flag: #TODO. "This is a fake break of dependency (dependency is
still there, but hidden). Think about a real fix (like, not using commander for actions."
^ actionGroup ifNil: [
| c |
c := self class environment at: #SpActionGroup.
actionGroup := c new beRoot ]
]

{ #category : 'initialization' }
Expand Down

0 comments on commit 026ec5d

Please sign in to comment.