Skip to content

Commit

Permalink
Merge pull request #1555 from demarey/fix-withWindowDo
Browse files Browse the repository at this point in the history
withWindowDo: should return the result of the block
  • Loading branch information
Ducasse committed Jun 13, 2024
2 parents 704ba41 + 34e1541 commit 6d0b7a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Spec2-Core/SpAbstractPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ SpAbstractPresenter >> withAdapterDo: aValuable [
{ #category : 'private - utilities' }
SpAbstractPresenter >> withWindowDo: aValuable [

self hasWindow ifFalse: [ ^ self ].
self hasWindow ifFalse: [ ^ nil ].
"Since Presenter has window, root = window"
aValuable value: self root
^ aValuable value: self root
]
4 changes: 2 additions & 2 deletions src/Spec2-Core/SpDialogWindowPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,6 @@ SpDialogWindowPresenter >> triggerOkAction [
"Trigger defined ok action.
See `SpDialogWindowPresenter>>#okAction:`"

okAction ifNil: [ ^ self ].
okAction cull: self
okAction ifNil: [ ^ nil ].
^ okAction cull: self
]
6 changes: 3 additions & 3 deletions src/Spec2-Core/SpStringTableColumn.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ SpStringTableColumn >> onAcceptEdition: aBlock [
acceptAction := aBlock
]

{ #category : #api }
{ #category : 'api' }
SpStringTableColumn >> onTextChanged: aBlock [
"Set the block to execute when cell edition is edited.
`aBlock` receives two arguments:
Expand All @@ -135,7 +135,7 @@ SpStringTableColumn >> onTextChanged: aBlock [
textChanged := aBlock
]

{ #category : #api }
{ #category : 'api' }
SpStringTableColumn >> sortFunction [

^ super sortFunction ifNil: [ self evaluation ascending ]
Expand All @@ -156,7 +156,7 @@ SpStringTableColumn >> sortFunction: aBlockOrSortFunction [
self isSortable: aBlockOrSortFunction isNotNil
]

{ #category : #accessing }
{ #category : 'accessing' }
SpStringTableColumn >> textChanged [

^ textChanged
Expand Down

0 comments on commit 6d0b7a3

Please sign in to comment.