SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Two questions (TsiLangLinked in Forms & Bad strings ID)

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
omunoz



Joined: 14 Sep 2006
Posts: 2
Location: Champaign, IL

PostPosted: Tue Oct 03, 2006 4:21 am    Post subject: Two questions (TsiLangLinked in Forms & Bad strings ID) Reply with quote

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
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2096

PostPosted: Tue Oct 03, 2006 9:35 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
omunoz



Joined: 14 Sep 2006
Posts: 2
Location: Champaign, IL

PostPosted: Tue Oct 03, 2006 4:57 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2096

PostPosted: Tue Oct 03, 2006 5:25 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group