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 

Source strings problem

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



Joined: 21 Jan 2003
Posts: 84
Location: Scotland

PostPosted: Tue Jan 21, 2003 5:37 pm    Post subject: Source strings problem Reply with quote

Doing my first project using D6 Pro and TsiLang 5.2.1

All was going well until I came to strings in the source code.
Some strings are being returned as empty strings by siLang1.GetTextOrDefault and I can't see where I am going wrong.

The ones returned OK are always OK, the others are always empty, so it is consistent.

The problem arises even in the same procedure of a unit, some are OK others blank. I have made sure that each unit has a unique series of IDS_ numbers.

Can there be a problem if one unit 'uses' another and .GetText.. looks in the wrong form?

Any pointers would be most welcome, please.
Back to top
View user's profile Send private message
Malcolm



Joined: 21 Jan 2003
Posts: 84
Location: Scotland

PostPosted: Tue Jan 21, 2003 6:01 pm    Post subject: Reply with quote

Ah! The problem seems to be .GetText.. is looking in the 'wrong' unit.

I duplicated the 'problem' strings in the other unit (a Data Module) and it now works.

Seems to be that where a unit uses other units .GetText looks in the .dfm of the 'active' unit (or something like that).

Hmm, that's going to be a problem - unless I can prefix the IDS_# with a unit name.

... off to try it .....
Back to top
View user's profile Send private message
Malcolm



Joined: 21 Jan 2003
Posts: 84
Location: Scotland

PostPosted: Tue Jan 21, 2003 6:14 pm    Post subject: Reply with quote

OK, cracked it.
Funny how one always finds the solution *after* asking someone else!

I had two siLang components with same name, Doh!
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Wed Jan 22, 2003 7:48 am    Post subject: Reply with quote

We're glad to see that you finally found the origin of problem by yourself. Smile
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