Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "introduce displayBlock and deprecate display." #1504

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Spec2-CommonWidgets/SpChooserPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ SpChooserPresenter >> initializePresenters [
SpChooserPresenter >> initializeSortingBlocks [

| sortingBlock |
sortingBlock := sourceList displayBlock ascending.
sortingBlock := sourceList display ascending.
sourceList sortingBlock: sortingBlock.
targetList sortingBlock: sortingBlock
]
Expand Down
13 changes: 3 additions & 10 deletions src/Spec2-CommonWidgets/SpFilteringListPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ SpFilteringListPresenter >> defaultOutputPort [

{ #category : 'api' }
SpFilteringListPresenter >> display [
self deprecated: 'Please use displayBlock' transformWith: '`aRec display' -> '`aRec displayBlock'.

^ self listPresenter displayBlock

^ self listPresenter display
]

{ #category : 'api' }
Expand All @@ -90,12 +89,6 @@ SpFilteringListPresenter >> display: aBlock [
self listPresenter display: aBlock
]

{ #category : 'api' }
SpFilteringListPresenter >> displayBlock [

^ self listPresenter displayBlock
]

{ #category : 'api' }
SpFilteringListPresenter >> displayIcon: aBlock [

Expand All @@ -118,7 +111,7 @@ SpFilteringListPresenter >> filterListItems: pattern [

filteredItems := unfilteredItems select: [ :item |
itemFilterBlock
value: (self displayBlock value: item)
value: (self display value: item)
value: pattern ].

listPresenter items: filteredItems
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ SpFilteringSelectableListPresenter >> deactivateItem: anObject [

{ #category : 'api' }
SpFilteringSelectableListPresenter >> display [
self deprecated: 'Please use displayBlock' transformWith: '`aRec display' -> '`aRec displayBlock' .

^ displayBlock
]

Expand All @@ -60,12 +60,6 @@ SpFilteringSelectableListPresenter >> display: aBlock [
listPresenter columns: self listColumns
]

{ #category : 'api' }
SpFilteringSelectableListPresenter >> displayBlock [

^ displayBlock
]

{ #category : 'api' }
SpFilteringSelectableListPresenter >> displayIcon: aBlock [

Expand Down
12 changes: 2 additions & 10 deletions src/Spec2-Core/SpDropListPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ SpDropListPresenter >> disableSelectionDuring: aBlock [
SpDropListPresenter >> display [
"Answer the formatting block to transform how the elements will be displayed.
See also `SpDropListPresenter>>#display:`"
self deprecated: 'Please use displayBlock' transformWith: '`aRec display' -> '`aRec displayBlock'.

^ displayBlock
]

Expand All @@ -97,19 +97,11 @@ SpDropListPresenter >> display: aBlock [

]

{ #category : 'api' }
SpDropListPresenter >> displayBlock [
"Answer the formatting block to transform how the elements will be displayed.
See also `SpDropListPresenter>>#display:`"

^ displayBlock
]

{ #category : 'private' }
SpDropListPresenter >> displayForItem: anItem [
"The order of the arguments may look weird, but then it seems more natural while using the widget"

^ self displayBlock cull: anItem model cull: anItem
^ self display cull: anItem model cull: anItem
]

{ #category : 'api' }
Expand Down
8 changes: 1 addition & 7 deletions src/Spec2-Core/SpDropListTableColumn.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SpDropListTableColumn >> acceptColumnVisitor: aBuilder [

{ #category : 'accessing' }
SpDropListTableColumn >> display [
self deprecated: 'Please use displayBlock' transformWith: '`aRec display' -> '`aRec displayBlock'.

^ display
]

Expand All @@ -53,12 +53,6 @@ SpDropListTableColumn >> display: aBlock [
display := aBlock
]

{ #category : 'accessing' }
SpDropListTableColumn >> displayBlock [

^ display
]

{ #category : 'initialization' }
SpDropListTableColumn >> initialize [

Expand Down
16 changes: 4 additions & 12 deletions src/Spec2-Core/SpListPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ SpListPresenter >> clickOnSelectedItem [

{ #category : 'api' }
SpListPresenter >> display [
"Answer the display block that will transform the objects from `SpAbstractListPresenter>>#model` into a displayable string."

self deprecated: 'Please use displayBlock' transformWith: '`aRec display' -> '`aRec displayBlock'.
^ self displayBlock.

"Answer the display block that will transform the objects from `SpAbstractListPresenter>>#model` into a
displayable string."

^ display
]

{ #category : 'api' }
Expand All @@ -75,13 +74,6 @@ SpListPresenter >> display: aBlock [
display := aBlock
]

{ #category : 'api' }
SpListPresenter >> displayBlock [
"Answer the display block that will transform the objects from `SpAbstractListPresenter>>#model` into a displayable string."

^ display
]

{ #category : 'api' }
SpListPresenter >> displayIcon [
"Return the block used to return an icon that will be displayed in the list"
Expand Down
9 changes: 1 addition & 8 deletions src/Spec2-Core/SpTreePresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ SpTreePresenter >> beResizable [
{ #category : 'api' }
SpTreePresenter >> display [
"Answer the display block that will transform the model nodes into a displayable string."
self deprecated: 'Please use displayBlock' transformWith: '`aRec display' -> '`aRec displayBlock'.

^ displayBlock
]

Expand All @@ -88,13 +88,6 @@ SpTreePresenter >> display: aBlock [
displayBlock := aBlock
]

{ #category : 'api' }
SpTreePresenter >> displayBlock [
"Answer the display block that will transform the model nodes into a displayable string."

^ displayBlock
]

{ #category : 'api' }
SpTreePresenter >> displayIcon [
"Return the block used to return an icon that will be displayed in the tree"
Expand Down
12 changes: 2 additions & 10 deletions src/Spec2-Morphic/SpDatePresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ SpDatePresenter >> date: aDate [

| dateString |
date := aDate.
dateString := self displayBlock value: date.
dateString := self display value: date.
self dateModel text: dateString.
]

Expand All @@ -84,7 +84,7 @@ SpDatePresenter >> defaultDate [
SpDatePresenter >> display [
"Return the one argument block used to wrap your domain specific items.
The block should return something that can be displayed in a list - like a String or a Text"
self deprecated: 'Please use displayBlock' transformWith: '`aRec display' -> '`aRec displayBlock'.

^ displayBlock
]

Expand All @@ -95,14 +95,6 @@ SpDatePresenter >> display: aBlock [
displayBlock := aBlock
]

{ #category : 'api' }
SpDatePresenter >> displayBlock [
"Return the one argument block used to wrap your domain specific items.
The block should return something that can be displayed in a list - like a String or a Text"

^ displayBlock
]

{ #category : 'private' }
SpDatePresenter >> iconMorph [

Expand Down
Loading