Compilation problem after CONST translation
Posted: Thu Feb 17, 2005 1:47 pm
Hi again,
Sorry but I have another one to report.
I have a unit A with no form containing a big CONST section. Only a part of the strings declared there have to be translated. So I deleted the non translatable strings in the editor and generated the code from TsiLang Expert. Since the unit has no form, I used my main form as a target.
In unit A, declarations like
scLangId = 'langid';
were changed to
scLangId : string = '';
while the following code was added to my main form
scLangId := siLang.GetTextOrDefault('strscLangId');
However, this didn't compile because in unit A, these declarations were still residing in the CONST section. So the statement above could not compile because the left member cannot be assigned (it's a CONST).
The problem was solved by manually moving the offending declarations in unit A from the CONST section to a VAR section. However, this should be done automatically
Regards.
Sorry but I have another one to report.
I have a unit A with no form containing a big CONST section. Only a part of the strings declared there have to be translated. So I deleted the non translatable strings in the editor and generated the code from TsiLang Expert. Since the unit has no form, I used my main form as a target.
In unit A, declarations like
scLangId = 'langid';
were changed to
scLangId : string = '';
while the following code was added to my main form
scLangId := siLang.GetTextOrDefault('strscLangId');
However, this didn't compile because in unit A, these declarations were still residing in the CONST section. So the statement above could not compile because the left member cannot be assigned (it's a CONST).
The problem was solved by manually moving the offending declarations in unit A from the CONST section to a VAR section. However, this should be done automatically
Regards.