Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Dec 18, 2023
1 parent 01ff23e commit da2d111
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
15 changes: 0 additions & 15 deletions src/Spec2-Core/SpAbstractTextPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -338,21 +338,6 @@ SpAbstractTextPresenter >> updateSelectionFromModel: aSelection [
anAdapter setSelectionFromModel: aSelection ]
]

{ #category : 'TOREMOVE' }
SpAbstractTextPresenter >> whenAboutToStyleChangedDo: aBlock [
"Set a block to perform when the about to style block changed"

self whenAboutToStyleBlockChanged: [:block :old :announcement :anAnnouncer |
aBlock cull: (block value) cull: old cull: announcement cull: anAnnouncer ]
]

{ #category : 'TOREMOVE' }
SpAbstractTextPresenter >> whenAcceptBlockChangedDo: aBlock [
"Set a block to perform when the accept block changed"

self property: #actionToPerform whenChangedDo: aBlock
]

{ #category : 'api - events' }
SpAbstractTextPresenter >> whenEditableChangedDo: aBlock [
"Inform when editable property has changed.
Expand Down
7 changes: 7 additions & 0 deletions src/Spec2-Core/SpDialogWindowPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,15 @@ SpDialogWindowPresenter >> addButton: aString do: aBlock [
{ #category : 'private' }
SpDialogWindowPresenter >> addDefaultButton: aButtonPresenter [
"Adds button logic to dialog."
| actionBlock |


actionBlock := aButtonPresenter action.
defaultButton := self addButton: aButtonPresenter.
aButtonPresenter action: [
actionBlock value.
"this is ugly, but this is how we can ensure this is not keeping the status as cancelled."
self beOk ].
defaultButton addStyle: 'default'.
^ defaultButton
]
Expand Down
8 changes: 3 additions & 5 deletions src/Spec2-Examples/SpPanedLayout.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ SpPanedLayout class >> exampleNotResizingStartChild [
app := SpApplication new.

presenter := SpPresenter newApplication: app.
presenter layout: (SpPanedLayout newVertical
presenter layout: (SpPanedLayout newTopToBottom
positionOfSlider: 50;
add: (child1 := presenter newListView)
withConstraints: [ :c | c beNotResizable ];
add: (child2 := presenter newListView);
add: (child1 := presenter newList) withConstraints: [ :c | c beNotResizable ];
add: (child2 := presenter newList);
yourself).

child1 items: #(one two).
child2 items: String loremIpsum substrings.

presenter open

]

0 comments on commit da2d111

Please sign in to comment.