[squeak-dev] Locale class >> #localeChangedGently
Frank Shearar
frank.shearar at gmail.com
Wed May 22 08:13:36 UTC 2013
On 21 May 2013 17:26, Bert Freudenberg <bert at freudenbergs.de> wrote:
> On 2013-05-21, at 11:00, Frank Shearar <frank.shearar at gmail.com> wrote:
>
>> This method looks like this:
>>
>> localeChangedGently
>> #(#ParagraphEditor #BitEditor #FormEditor #StandardSystemController )
>> do: [:key | Smalltalk
>> at: key
>> ifPresent: [:class | class initialize]].
>> PartsBin localeChangedGently.
>> Project localeChangedGently.
>> PaintBoxMorph localeChangedGently.
>> ColorPickerMorph localeChangedGently.
>> Preferences localeChangedGently.
>>
>> Firstly, it should just say something like
>>
>> localeChangedGently
>> self environment allClassesDo: [:cls |
>> (cls respondsTo: #localeChangedGently) ifTrue: [cls
>> localeChangedGently]]
>>
>> or, even better, have classes register with something to show that
>> they have work to do when changing locale:
>>
>> localeChangedGently
>> allRegisteredObjects do: [:o | o localeChangedGently].
>>
>> But secondly, this is the sole implementor of #localeChangedGently!
>
> In the Etoys image there are 5 implementers of it, one of which is
>
> Object>>localeChangedGently
> self localeChanged.
>
> The localization stuff has not been ported completely, yet.
How bit this as a plan for breaking this particular dependency?
* Add Object >> #localeChangedGently to System-Localization
* For each of the classes mentioned in LocaleClass class >>
#localeChangedGently (ParagraphEditor, BitEditor, and so on) implement
a #localeChanged that calls self initialize
* Use reflection to invoke these, something like this:
localeChangedGently
self environment allClassesDo: [:cls | cls localeChangedGently]
but please suggest something nicer. I'm saying "self environment" here
because we might well need different environments set to different
locales.
frank
>> I thought I'd broken SystemNavigation with my recent hacking, but I
>> have a pre-Environment-friendly-SystemNavigation image, and I see no
>> other implementors there either.
>>
>> frank
>>
>
> - Bert -
>
>
>
More information about the Squeak-dev
mailing list
|