Comment to chapter "Reuse and composition at work"
p. 61 Bug in the code: “WidgetClassListPresenter >> initializePresenters list := self newList. list items: (AbstractWidgetModel allSubclasses sorted: [:a :b | a name < b name ]). self focusOrder add: list.” – should be SpAbstractWidgetPresenter.
p. 61 “To allow this, we add a configuration method named whenSelectionChangedDo: as follows:” – it would be better ends the line with dot but colon.
p. 62 There is a contradiction (may be) in naming of ProtocolMethodListPresenter’s instance variables: “label” points to the kind of a widget, “methods” points to the way of using.
p. 62 Bugs in the code
- “ProtocolMethodListPresenter >> initializePresenters methods := self newList. methods displayBlock: [ :m | m selector ]. …” – should be display: [ :m | m selector ].
- “This UI can be seen by executing ProtocolMethodList new open.” – should be ProtocolMethodListPresenter.
- “ProtocolMethodListPresenter >> defaultLayout ^ SpBoxLayout newVertical add: #label withConstraints: [:c | c expand: false]; add: #methods withConstraints: [:c | c fill]; yourself” – should be c fill: true.
p. 64 Note “… the methods and the label are accessible through their accessors,” – but no any accessors were defined.
p. 67 Wrong name of class in the code snippet “ProtocolViewer new open” – should be ProtocolViewerPresenter.
Bad presentation: ProtocolViewerPresenter with default extent shows only two included presenters: models and api. The events presenter is hidden below the bottom edge of the window. We can view the presenter only by dragging the bottom edge down. The situation is much more worse with the horizontalLayout: it is impossible to show the event presenter, even by dragging the right edge right.
p. 72 The explanation is not complete. Class ProtocolCodeBrowserPresenter is not described.
An illustration to the "Bad presentation"
Checked all the points and addressed them