Page 1 of 1

TsiLangLinked not being created when form is loaded

Posted: Fri Sep 08, 2006 2:55 am
by pls
I'm using TSILang 6.02 and CBuilder 6. I have one form in my application that has a problem. This form is not automatically created, but is created by the application on demand with a new and displayed with ShowModal.

This form contains a TsiLangLinked component whose Dispatcher and CommonContainer properties are set by the object inspector to point to a TsiLang instance in the main form.

When the form is created and ShowModal called, I set values for form fields in the FormShow method. At this point, the variable that should point to a TsiLangLinked instance is null. So my calls to
siLangLinked->GetTextOrDefault crash.

I don't understand why I'm having this problem, and any ideas for troubleshooting would be greatly appreciated. What could possible cause this?

Posted: Fri Sep 08, 2006 3:32 am
by isiticov
I can suggest to check the following:
1. Varaiable and component names you use. May be TsiLangLinked has different name that you try to use with GetTextOrDefault() and or you have some variable named the same as TsiLangLinked.
2. May be in some place of your code you delete the TsiLangLinked accidentally? And later in FormShow it is nil.

Posted: Sat Sep 09, 2006 3:07 am
by pls
I've checked both of those. This is a very simple form so I can be sure I'm not doing those things.

If you will email me at the address on my profile, I will respond by mailing you the form and the code that creates it. There isn't that much.

I also just checked in the constructor of my form object (derived from TForm). The siLangLinked1 variable is null there too. It seems like somthing is going wrong in the process of creating the form. I've tried deleting the TsiLangLinked component from the form and then adding it back with a different name. It made no difference.

++PLS

Posted: Sat Sep 09, 2006 3:23 am
by isiticov
PM just sent.