BuildingApplicationWithSpec2
BuildingApplicationWithSpec2 copied to clipboard
Comment to chapter 15
p. 141 “EgContactBook >> add: contactName phone: phone | contact | contact := EgContact new name: contactName; phone: phone.” – should be “EgContact name: contactName phone: phone.” with help of the class method.
p. 145
- Subsection Layout “EgContactBookPresenter class >> defaultSpec” – should be EgContactBookPresenter >> defaultLayout.
- Subsection Widget initialization “… table addColumn: (StringTableColumn…” should be SpStringTableColumn.
- Subsection Widget initialization “table items: contactBook contents.” The contact book has not method contents. Two different accessors mentioned in the next chapter: contents and contacts. We should decide which one is needed and declare it. It is evident that only an accessor must be declared.
- Subsection Widget initialization – bad formatting: “… the UI by executing the following snippet(EgContactBookPres” – should inser a space after “snippet”.
p. 146 Subsection Interacting with user “^ EgContact new name: splitted first; phone: splitted second; yourself” – should use the appropriate class method “^ EgContact name: splitted first phone: splitted second”
p. 147 Subsection Some extra methods “EgContactBookPresenter >> isContactSelected ^ self table selectedItems isNotEmpty” – self is needless, should be removed.