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 

Do .sil and .sib files have same functionality

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



Joined: 21 Jan 2003
Posts: 84
Location: Scotland

PostPosted: Sat Jun 12, 2004 10:20 am    Post subject: Do .sil and .sib files have same functionality Reply with quote

v 5.3.0 with D6
Are there situations where only one of these formats can be used?

I have found that with a TsiLangRT, I can .LoadOnCreate from a .sil file but not from a .sib file.

I can get the built-in editor with a TsiLangRT to save to a .sib file OK but I can't get it to read back any changes from an external editor (SILEditor).

Another problem I have with using the TsiLangExpert to create a .sil file is that it runs very slowly and the memory use ramps up from 158Mb to 2Gb on a project with only 41 forms. On completion the memory is not released until I close Delphi. Perhaps I need to re-install TsiLang?
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Sat Jun 12, 2004 10:27 am    Post subject: Re: Do .sil and .sib files have same functionality Reply with quote

Malcolm wrote:
v 5.3.0 with D6
Are there situations where only one of these formats can be used?


Both formats have the same functionality and could be used in all situations except one case (see below). SIB files are just much faster than SIL.

Malcolm wrote:
I have found that with a TsiLangRT, I can .LoadOnCreate from a .sil file but not from a .sib file.


This is strange since this shall work in both cases. Be sure that StorageFile property points to correct file.

Malcolm wrote:
I can get the built-in editor with a TsiLangRT to save to a .sib file OK but I can't get it to read back any changes from an external editor (SILEditor).


Yes, this is the only place. The built-in editor unable to save/load to/from SIB file only SIL is supported there.

Malcolm wrote:
Another problem I have with using the TsiLangExpert to create a .sil file is that it runs very slowly and the memory use ramps up from 158Mb to 2Gb on a project with only 41 forms. On completion the memory is not released until I close Delphi. Perhaps I need to re-install TsiLang?


This is very strange situation. Could you reproduce this on any project or just for one particular project?
Back to top
View user's profile Send private message
Malcolm



Joined: 21 Jan 2003
Posts: 84
Location: Scotland

PostPosted: Sat Jun 12, 2004 5:00 pm    Post subject: Reply with quote

Thanks for the quick reply.

Yes, .sib is much faster, that's why I wanted to use it.

I have spent quite a lot of time trying to find the problem here - with no success. I have uninstalled, deleted the siComponents folder tree and searched for other copies of .dcu files. Then I installed again - same problem with making .sil file. I only use siLang in one project at present so I tried with the Demos but they were too small to be sure if they had the same problem. Sad

When saving to a .sib file, very little extra memory is used. But it seems that something here is causing a big memory leak when saving the project to a .sil file. Sad

I have decided to revert to siLang components and get my end-user translator to simply use the SILEditor with a .sib file. Well .. at least for the present.
Back to top
View user's profile Send private message
Malcolm



Joined: 21 Jan 2003
Posts: 84
Location: Scotland

PostPosted: Mon Aug 16, 2004 5:28 pm    Post subject: Reply with quote

PS:

I have just updated to v5.3.1 and now the Save Project to SIL file works without the memory problem Smile
Back to top
View user's profile Send private message
kdeberni



Joined: 17 Aug 2004
Posts: 11

PostPosted: Fri Oct 15, 2004 7:06 am    Post subject: Reply with quote

As we all know "sheet happens" Smile but one way or another you have done a great job with this components so it is OK anyway.

Regarding my problem it is little better. The file is not anymore corrupted but I found a little time and debug all. First I could not find when you are loading tranlsation file (.sil) so I decide to load it "manually". Maybe I explain it better. On the beginning OnCreate of DataModule where I have dispatcher and siLangRT comp I had code:

procedure TdmLanguage.DataModuleCreate(Sender: TObject);
begin
siLangDispatcher.FileName := ExtractFileDir(Application.ExeName) + '\Resources\HAMER.sil';
siLangRT.StorageFile := siLangDispatcher.FileName;
end;

As you can see was not loading file anywhere and it was woking till..??

Today I change code to:

procedure TdmLanguage.DataModuleCreate(Sender: TObject);
begin
siLangDispatcher.FileName := ExtractFileDir(Application.ExeName) + '\Resources\HAMER.sil';
siLangDispatcher.LoadAllFromFile(siLangDispatcher.FileName); //!!!!!!!
siLangRT.StorageFile := siLangDispatcher.FileName;
siLangRT.LoadAllFromFile(siLangRT.StorageFile, True); //!!!!!!!
end;

As you can see now I am loading file. (Active lanuage is set latter in the code).
Am I doing OK?
Maybe some tips.
When are you loading (reloading) the file content?

Thenks agagin.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Oct 15, 2004 2:52 pm    Post subject: Reply with quote

1. As I said in other post, I can't see a reason for you to use TsiLangRT. TsiLang will be enough in your case.
2. When you have set TsiLangDispatcher.FileName property all TsiLang(s) that are managed by this dispatcher will load their content from this file _on connecting_ to this dispatcher. "On connecting" means reading their properties from stream or assigning LangDispatcher property at run-time in your code. Reading properties is performed by Delphi on form creation.
3. So in case you've set FileName property at design-time _all_ TsiLang(s) linked to this dispatcher will load content correctly.
4. But when you assigning FileName property of dispatcher at run-time TsiLang(s) used on already created forms won't be automatically loaded. This is why it is necessary to call LoadAllFromFile() method of dispatcher in order to load all already created TsiLang(s).
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