You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
body whenTextChangedDo: [ :text | self model body: text ]
354
354
```
355
355
356
+
`EmailPresenter` inherits from `SpPresenterWithModel`, which means that we have to state in the `modelChanged` method what should happen when the model changes. We set the text of the four fields.
357
+
358
+
```
359
+
EmailPresenter >> modelChanged
360
+
361
+
from text: (self model from ifNil: [ '' ]).
362
+
to text: (self model to ifNil: [ '' ]).
363
+
subject text: (self model subject ifNil: [ '' ]).
364
+
body text: (self model body ifNil: [ '' ])
365
+
```
366
+
356
367
For convenience later on, we define two extra methods to make the fields editable or read-only.
0 commit comments