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! 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 |
On 2013-05-21, at 11:00, Frank Shearar <[hidden email]> 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. > 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 - |
On 21 May 2013 17:26, Bert Freudenberg <[hidden email]> wrote:
> On 2013-05-21, at 11:00, Frank Shearar <[hidden email]> 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 - > > > |
Free forum by Nabble | Edit this page |