siLang data mod initialization

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
DavidD
Posts: 17
Joined: Wed Mar 07, 2007 9:19 pm
Location: United States

siLang data mod initialization

Post by DavidD »

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
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

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.
Best regards,
Igor Siticov.
Post Reply