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 

siLang data mod initialization

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



Joined: 07 Mar 2007
Posts: 17
Location: United States

PostPosted: Thu Mar 15, 2007 9:53 pm    Post subject: siLang data mod initialization Reply with quote

We have placed both both the siLangDispatcher and siLang components in an otherwise empty data mod called dmInternational. It is auto-created before any other form. However, several of our non-visual units reference GetTextordefault and MessageDlg and they have initialization code sections. This combination generates a 216 error.

I have worked around this by having dmInternational create itself in its own initialization code section and moving it to the top of the uses list in the DPR file after the Borland units and before any of our units.

Is there a more elegant solution?

Thanks again
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Mar 16, 2007 3:56 am    Post subject: Reply with quote

Hello,

No, this is the most correct way for this situation (if you initialize strings in initialization section). But you can just modify a little your code by initializing these strings inside OnCreate event of this data module and then you won't need to check all the time the order of listed units in your project source.
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