Page 1 of 1

Can't load SIB but SIL is ok

Posted: Thu Dec 30, 2004 10:09 pm
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

Posted: Thu Dec 30, 2004 10:21 pm
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

Posted: Thu Dec 30, 2004 11:22 pm
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.

Posted: Fri Dec 31, 2004 6:49 am
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.

Posted: Fri Dec 31, 2004 9:52 am
by Antony Corbett
Thanks for the speedy response. I will await a planned release rather than take the modified source.

Posted: Thu May 12, 2005 5:14 am
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?

Posted: Thu May 12, 2005 6:28 am
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.

Posted: Wed May 18, 2005 4:34 am
by scatsman
The fix worked. Thank you.