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 

Problems a with a unit without form in Delphi 7

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



Joined: 14 Feb 2005
Posts: 8
Location: Argentina

PostPosted: Fri Feb 18, 2005 4:39 pm    Post subject: Problems a with a unit without form in Delphi 7 Reply with quote

Hi,

I'm working with Delphi 7 and Tsilang Components Suite 5.3.2.
I have a unit without form called License. This unit have four constant strings:

err1000= 'Ivalid license file';
err1001= 'License CRC failed';
(.......)

I go to Tsilang Expert --> File --> Const Section --> Without Form.
I select unit called "License" and Select the Main Form with Tsilang.

Tsilang generates in the license unit the following code:

err1000: string = '';
err1001: string = '';

And this code in the Main Form:

procedure TDoc_MainForm.UpdateStrings;
begin
err1001 := siLang1.GetTextOrDefault('strerr1001');
err1000 := siLang1.GetTextOrDefault('strerr1000');
(....)

I translate the strings in the Translation Editor....

But when I press Ctrl + F9 to compile, I receive the following error in the main form:

Undeclared Identifier: 'err1001'
Undeclared Identifier: 'err1000'

Thats because there is no const declaration in the main form for this constant.

I will appreciate any help about this issue.

Regards
Marcelo
Back to top
View user's profile Send private message Visit poster's website
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Feb 18, 2005 6:02 pm    Post subject: Reply with quote

Just add unit License to uses clause of main form unit.
Back to top
View user's profile Send private message
doctec



Joined: 14 Feb 2005
Posts: 8
Location: Argentina

PostPosted: Fri Feb 18, 2005 7:09 pm    Post subject: Reply with quote

Excelent! it's working now.
Thanks a lot Isiticov for your help.

Just a suggestion, It would be great that Tsilang Expert add the unit to the uses clause automatically.

Regards.
Marcelo
Back to top
View user's profile Send private message Visit poster's website
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