BuildingUIWithSpec icon indicating copy to clipboard operation
BuildingUIWithSpec copied to clipboard

Use ListPresenter API in examples instead of plain Pharo code

Open jecisc opened this issue 7 years ago • 2 comments

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.

jecisc avatar Oct 05 '18 14:10 jecisc

tx cyril. I should really push what quentin did to validate books.

Ducasse avatar Oct 05 '18 18:10 Ducasse

I'll probably do some PR later. For now I open issues to not forget.

jecisc avatar Oct 05 '18 19:10 jecisc