Two questions (TsiLangLinked in Forms & Bad strings ID)

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
omunoz
Posts: 2
Joined: Thu Sep 14, 2006 5:54 pm
Location: Champaign, IL

Two questions (TsiLangLinked in Forms & Bad strings ID)

Post by omunoz »

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
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

1) It looks like something wrong in your ThirdFrom.pas. If you used TsiLangLinked on TForm2 and TForm3 inherited from TForm2 then in the declaration of TForm3 you won't see TsiLangLinked. It will be inherited from TForm2 and you don't need to insert new one there.

2) Yes, this is a bug and we will fix it. Thank you for reporting.
Best regards,
Igor Siticov.
omunoz
Posts: 2
Joined: Thu Sep 14, 2006 5:54 pm
Location: Champaign, IL

Post by omunoz »

Thanks for your response.

When I don't insert a TsiLangLinked component in TForm3, I don't have any error, but when I try to save my project from TsiLang Expert, all the controls of TForm3 are not saved. Also, if I want to look for hard-coded strings, it will automatically insert a TsiLnag component in the form. How can I solve this?

I also noticed something else. I started using TsiLangLinked_Tnt components, but when I save my project into a SIB file, and then I try to open the SIB file with the stand-alone editor, I get the following message: "Unable to open <path>\<filename>.sib! Error: Class TsiLangLinked_tnt not found". If I save the project into a SIL file, it opens correctly with the stand-alone editor.

Thanks,
Oscar
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Please don't insert component manually. Just open inherited form, move a little TsiLangLinked on it and save. This will place component data into DFM and expert will see it.
We will fix this issue in SIL Editor.
Best regards,
Igor Siticov.
Post Reply