Incorect update of ChangeLanguage event procedure

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
Jean-Paul Brassard
Posts: 65
Joined: Thu May 08, 2008 7:46 pm

Incorect update of ChangeLanguage event procedure

Post by Jean-Paul Brassard »

Hi,

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;
Jean-Paul Brassard
Quebec, Canada
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hi,

Thank you for reporting this. We will try to improve this in next version.
Best regards,
Igor Siticov.
Post Reply