@@ -247,6 +247,7 @@ Object << #EarthMap
247247```
248248
249249We initialize the ` countries ` instance variable to an ` OrderedCollection ` .
250+ Define an accessor.
250251
251252```
252253EarthMap >> initialize
@@ -347,19 +348,22 @@ First we define a new class `EarthCountryBrowser`. It inherits from the class `S
347348
348349```
349350SpPresenterWithModel << #EarthCountryBrowser
350- slots: { #countryList . #countryCode . #countryFlag };
351+ slots: { #countryList . #countryCode . #countryFlag };
351352 package: 'EarthTutorial'
352353```
353354
354355The instance variables are:
355356- ` countryList ` is a presenter of the list of country names. It is a drop-list presenter.
356357- ` countryCode ` is a presenter to display the country code such as FR or CH. It is an input field presenter.
357358- ` countryFlag ` is a presenter for the flag. It is an image presenter.
358- - map is an instance of the class ` EarthMap ` .
359359
360360#### Initialize sub components.
361361
362362With the method ` initializePresenters ` , we initialize the different presenters that compose our interface.
363+ Note that the expression ` self model ` is given by the superclass ` SpPresenterWithModel ` .
364+ The model is automatically set using the message \ct{on:} as shown below in expression
365+ \ct{(EarthCountryBrowser on: ...}.
366+ In our scenario the model is an instance of the class \ct{EarthMap}.
363367
364368```
365369EarthCountryBrowser >> initializePresenters
@@ -426,7 +430,7 @@ EarthCountryBrowser >> flagForCountryCode: astring
426430 ^ BorderedMorph new asForm
427431```
428432
429- Once this done we can know define the method ` onCountrySelected: `
433+ Once this is done, we can now define the method ` onCountrySelected: `
430434that will display the country code and the flag. We concatenate some spaces in front of the country code so that it looks better on the screen.
431435
432436
0 commit comments