Each time I run the ConstSection command of the Expert, TsiLang adds a call to UpdateStrings at the end of MySiLangChangeLanguage.
I do not understant why this call is added at the end instead of the beginning of the ChangeLanguage procedure, knowing that the ChangeLanguage procedure will have to refresh the GUI according to the new language
I then moved the call to UpdateStrings at the beginning of the procedure, where I need it.
Unfortunately, each time I rerun the Expert's ConstSection command, an extra UpdateStrings is added at the end of MySiLangChangeLanguage, even if there is already one at the user defined good spot.
N.B. The call that I moved at the beginning stay there, so my application still works OK. Does the second call usefull to something?
Jean-Paul
P.S. here is an extract of mini app to show the problem:
Code: Select all
const
cstConst: string = ''; (* constant *)
cst2eConst: string = ''; (* 2nd cst *)
procedure TForm1.siLang_Form1ChangeLanguage(Sender: TObject);
begin
UpdateStrings; //moved before the Caption update
StaticText1.Caption := StaticText1.Caption + siLang_Form1.Language + '=>' +
cstConst +'/'+ cst2eConst + #13;
UpdateStrings; ///extra call !!!???
end;