Can't load SIB but SIL is ok

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
Antony Corbett
Posts: 4
Joined: Thu Dec 30, 2004 6:37 pm

Can't load SIB but SIL is ok

Post by Antony Corbett »

Using 5.3.2 and BCB 6

I've set up a test app with:

1. TsiLangDispatcher and TsiLang on an auto-created data module
2. TsiLangLinked components on each of several forms (linked to the above two components)

I then create two files (test.SIL and test.SIB) to test both formats.

In the constructor of the data module I load the SIL file with no problems:

Code: Select all

LangDisp->FileName = "test.sil";
It's my understanding that this is all that is needed to load the language file and make the translations available. This works well, and I can swap between the two languages that my SIL file contains.

But if I modify the code and try to load the SIB file, language swapping has no affect:

Code: Select all

LangDisp->FileName = "test.sib";
There are no exceptions.

BTW, test.SIB loads succesfully into SILEditor and displays the correct translations.

However, when I load test.SIL (the file that seems to work) into SILEditor I get an error "Too many languages found" and the Fragment displays "DEFAULT_CHARSET~!@#$~!@#$~!@#$

Any help gratefully received.

--
Antony
Antony Corbett
Posts: 4
Joined: Thu Dec 30, 2004 6:37 pm

Post by Antony Corbett »

The "Too many languages found" error is caused by a corruption of the SIL file. It seems that if I "Save Project", the TStatusBar on my main form always generates a line which contains one gratuitous delimiter token at the end!

Still left with the more fundamental question about SIB
Antony Corbett
Posts: 4
Joined: Thu Dec 30, 2004 6:37 pm

Post by Antony Corbett »

I have found that if I set a Fixed language in my SIB file using SILEditor then the SIB file doesn't work. If I remove the Fixed attribute then it works fine!

Setting or clearing the Fixed language in a SIL file does not change behaviour - it always works.
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

The bug with fixed languages and loading of SIB file is fixed. Let us know if you need modified source and we will send it to you privately.
Thanks.
Antony Corbett
Posts: 4
Joined: Thu Dec 30, 2004 6:37 pm

Post by Antony Corbett »

Thanks for the speedy response. I will await a planned release rather than take the modified source.
scatsman
Posts: 2
Joined: Thu May 12, 2005 2:08 am
Location: Sydney, Aus

Post by scatsman »

We've also encountered the same problem with fixed languages and loading of SIB file. We're using 5.3.2 and BCB 6.

How can we get access to the fix?
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Version 6.0 is currently under beta-testing and it is planning to be released in next few months. But if you need to apply fix now you can make the follwing:
1. In unit sicomp.pas locate the line with

Code: Select all

procedure TSIBFileManager.LoadFromStream(const AComp: TsiCustomLang; const
  AOwnerClassName: string; AStream: TStream);
2. Replace it with code I sent you in private message.
3. Re-build the package and projects.

Please let us know if this helps.
scatsman
Posts: 2
Joined: Thu May 12, 2005 2:08 am
Location: Sydney, Aus

Post by scatsman »

The fix worked. Thank you.
Post Reply