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 

SIL Editor

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



Joined: 23 Aug 2012
Posts: 8

PostPosted: Fri Oct 19, 2012 10:07 am    Post subject: SIL Editor Reply with quote

Hello,

If I use the 'Remove' command from the SIL Editor to delete one or more languages from an existing .sib file and afterwards load the resulting file into my application, then the number of languages is not read correctly. I found out that the TsiLang.FNumLang property is read correctly, but the TsiLang.LangNames property contains one language name too much (which then leads to the errornously stated number of languages). It seems as if the SIL Editor does not update the LangNames property correctly.

I am using the newest SIL Editor (ver. 6.0.0.41).

Kind regards,
Richard
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Fri Oct 26, 2012 8:09 am    Post subject: Reply with quote

Hello,

How do you load updates SIB file? Did you mean loading it under IDE in TsiLang Expert or at run-time? If you load it under IDE and use TsiLangDispatcher then you have to manually update language settings in Dispatcher. Because TsiLang Expert doesn't update dispatcher it only load content to TsiLang on forms.
If you use run-time loading then TsiLangDispatcher will automatically update language settings in you use LoadAllFromFile() method.
Back to top
View user's profile Send private message
Richard Mueller



Joined: 23 Aug 2012
Posts: 8

PostPosted: Fri Oct 26, 2012 8:32 am    Post subject: Reply with quote

I load the sib file druing run-time with the function LoadAllFromFile(). But anyhow, I think that the SIL Editor stores the data in an inconsitent way. Could you check whether the number of languages and the number of languages in the collection of language names match?
Back to top
View user's profile Send private message
Richard Mueller



Joined: 23 Aug 2012
Posts: 8

PostPosted: Fri Oct 26, 2012 9:00 am    Post subject: Reply with quote

What I found out:
The method TSIBFileManager.LoadFromStream() loads the data from the stream in the temporary component SI. The corresponding line of code is

SI := TsiCustomLang(AStream.ReadComponent(SI));

If you check now the properties

SI.FNumLang and
SI.LangNames,

then you will see that the number of strings in SI.LangNames is one more than SI.FNumLang says.

Afterwards, when the values of the temporary object SI are assigned to AComp, the SI.LangNames determines the number of languages. This results in a wrong number of languages.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Wed Oct 31, 2012 8:58 am    Post subject: Reply with quote

Unfortunately, we're unable to reproduce this. Could you please send us sample SIB file that reproduces this error and sample project?
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