Skip to content

Commit

Permalink
Merge pull request #1481 from MarcusDenker/Commit-Deprecated
Browse files Browse the repository at this point in the history
Commit deprecations transforms
  • Loading branch information
MarcusDenker committed Dec 1, 2023
2 parents e480e03 + cfcc509 commit 143fe26
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
11 changes: 7 additions & 4 deletions src/Spec2-Backend-Tests/SpNotebookAdapterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,16 @@ SpNotebookAdapterTest >> testSelectedPage [

{ #category : 'tests' }
SpNotebookAdapterTest >> testSelectingPageShouldAnnounceChangeEvent [
| change |

| change |
self adapter widget tabSelectorMorph selectedIndex: 1.
self adapter widget announcer when: SpNotebookPageChanged do: [ :ann | change := ann ].

self adapter widget announcer
when: SpNotebookPageChanged
do: [ :ann | change := ann ]
for: self.

self adapter widget tabSelectorMorph selectedIndex: 2.

self assert: change oldPage model title equals: 'Mock'.
self assert: change page model title equals: 'Mock2'
]
4 changes: 1 addition & 3 deletions src/Spec2-Core/SpAbstractPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,7 @@ SpAbstractPresenter >> validateInto: aValidationReport [
{ #category : 'events' }
SpAbstractPresenter >> whenBuiltDo: aBlock [

self announcer
when: SpWidgetBuilt
do: aBlock
self announcer when: SpWidgetBuilt do: aBlock for: aBlock receiver
]

{ #category : 'events' }
Expand Down
4 changes: 2 additions & 2 deletions src/Spec2-Core/SpJob.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ SpJob >> whenChangedDo: aBlock [
{ #category : 'events' }
SpJob >> whenEndDo: aBlock [

self announcer when: JobEnd do: aBlock
self announcer when: JobEnd do: aBlock for: aBlock receiver
]

{ #category : 'events' }
SpJob >> whenStartDo: aBlock [

self announcer when: JobStart do: aBlock
self announcer when: JobStart do: aBlock for: aBlock receiver
]
5 changes: 3 additions & 2 deletions src/Spec2-Core/SpWindowPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,11 @@ SpWindowPresenter >> whenWillCloseDo: aBlock [
"Inform when window will close, allowing process before the close happen.
Note that user cannot cancel the close operation using this event.
`aBlock` receives one optional argument (an instance of the announcement `SpWindowWillClose`)."
self announcer

self announcer
when: SpWindowWillClose
do: aBlock
for: aBlock receiver
]

{ #category : 'private' }
Expand Down

0 comments on commit 143fe26

Please sign in to comment.