Skip to content

Commit 879ae8a

Browse files
authored
Update Commander.md - typos
While talking about menus, the reference to the Chapter 12 is wrong. Should be Chapter 13. `NewMailTemplateCommand >> newFromTemplate:` - wrong class here. Should be `MailClientPresenter `. And `editedEmail beDraft.` is needless as in `MailClientPresenter >> newMail`
1 parent 4e75b2b commit 879ae8a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Chapters/Commander2/Commander.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ FetchMailCommand >> execute
198198

199199
### Adding placeholder commands
200200

201-
We also define placeholder commands for functionality that was not implemented by the Mail application in Chapter *@cha_mailapp@*. We will not implement them here either. We only provide a name and a description, which are required for the UI.
201+
We also define placeholder commands for functionality that was not implemented by the Mail application in Chapter *@cha_menus@*. We will not implement them here either. We only provide a name and a description, which are required for the UI.
202202

203203
#### FormatPlainTextCommand
204204

@@ -298,7 +298,7 @@ MailClientPresenter class >> buildAccountMenuWith: presenter
298298

299299
### Using fillWith:
300300

301-
In Chapter *@cha_mailapp@*, we defined the method `MailClientPresenter >> accountMenu` to return the context menu for the `MailAccountPresenter`. When using commands, we implement it differently. We create a new menu and fill it with the commands defined in the method above. A presenter has access to the root of the command tree through the message `rootCommandsGroup`. Subtrees can be accessed by sending the `/` message. By using commands, building up the context menu is almost trivial:
301+
In Chapter *@cha_menus@*, we defined the method `MailClientPresenter >> accountMenu` to return the context menu for the `MailAccountPresenter`. When using commands, we implement it differently. We create a new menu and fill it with the commands defined in the method above. A presenter has access to the root of the command tree through the message `rootCommandsGroup`. Subtrees can be accessed by sending the `/` message. By using commands, building up the context menu is almost trivial:
302302

303303

304304
```
@@ -537,10 +537,9 @@ NewMailTemplateCommand >> execute
537537
The implementation above requires the addition of an extension method to the `MailClientPresenter` class. The method below resides in the package "CodeOfSpec20Book-Extensions". The implementation of the method is similar to `MailClientPresenter >> newMail`. The only difference is setting the given template by sending the `body:` message to the new mail.
538538

539539
```
540-
NewMailTemplateCommand >> newFromTemplate: aString
540+
MailClientPresenter >> newFromTemplate: aString
541541
542542
editedEmail := Email new.
543-
editedEmail beDraft.
544543
editedEmail body: aString.
545544
reader updateLayoutForEmail: editedEmail.
546545
self modelChanged

0 commit comments

Comments
 (0)