Two questions (TsiLangLinked in Forms & Bad strings ID)
Posted: Tue Oct 03, 2006 4:21 am
I have two questions about TsiLang.
1) I want to have a form descending from another form. Both of them have TsiLangLinked components. I set the IsInheritedOwner property of the descending form TsiLangLinked component to true, while the one in the parent form is set to false. Yet, when I create the descending form, it raises the exception 'Only One TsiCustomLang component per Form/DataModule allowed!'. How can I fix this?
In SecondForm.pas:
TForm2 = class(TTntForm)
siLangLinked1: TsiLangLinked; // IsInheritedOwner := False
...
end;
In ThirdForm.pas:
TForm3 = class(TForm2)
siLangLinked1: TsiLangLinked; // IsInheritedOwner := True
...
end;
In MainUnit.pas:
procedure TForm1.TntBitBtn3Click(Sender: TObject);
var TheDlg : TForm3;
begin
TheDlg := TForm3.Create(self);
TheDlg.ShowModal;
TheDlg.Free;
end;
2) I use the Check bad strings ID tool to detect references to IDs not used in the code. It works correctly if the IDS are used with the GetTextOrDefault function. But all the strings are returned as bad strings when they are used in the code with the GetTextOrDefaultW function. Is this a bug or does it have a purpose?
Thanks
Oscar
1) I want to have a form descending from another form. Both of them have TsiLangLinked components. I set the IsInheritedOwner property of the descending form TsiLangLinked component to true, while the one in the parent form is set to false. Yet, when I create the descending form, it raises the exception 'Only One TsiCustomLang component per Form/DataModule allowed!'. How can I fix this?
In SecondForm.pas:
TForm2 = class(TTntForm)
siLangLinked1: TsiLangLinked; // IsInheritedOwner := False
...
end;
In ThirdForm.pas:
TForm3 = class(TForm2)
siLangLinked1: TsiLangLinked; // IsInheritedOwner := True
...
end;
In MainUnit.pas:
procedure TForm1.TntBitBtn3Click(Sender: TObject);
var TheDlg : TForm3;
begin
TheDlg := TForm3.Create(self);
TheDlg.ShowModal;
TheDlg.Free;
end;
2) I use the Check bad strings ID tool to detect references to IDs not used in the code. It works correctly if the IDS are used with the GetTextOrDefault function. But all the strings are returned as bad strings when they are used in the code with the GetTextOrDefaultW function. Is this a bug or does it have a purpose?
Thanks
Oscar