BuildingUIWithSpec
BuildingUIWithSpec copied to clipboard
Use ListPresenter API in examples instead of plain Pharo code
In the Reuse chapter there is this code:
WidgetClassList >> initializeWidgets
list := self newList.
list items: (AbstractWidgetModel allSubclasses
sorted: [:a :b | a name < b name ]).
self focusOrder add: list.
It should be:
WidgetClassList >> initializeWidgets
list := self newList.
list
items: AbstractWidgetModel withAllSubclasses;
sortingBlock: [ :a :b | a name < b name ].
self focusOrder add: list
Like that we show more of Spec API.
tx cyril. I should really push what quentin did to validate books.
I'll probably do some PR later. For now I open issues to not forget.