>I am trying to use the SpellBound class on a form to spell check the contents of an edit box. I have a button with the following:
>
>LOCAL oSpellIt
>SET CLASSLIB TO spellbound ADDITIVE
>oSpellIt = CREATEOBJECT('spellit')
>oSpellIt.CheckSource = 'thisform.edtComments.Value'
>oSpellIt.DoCheck()
>
>RELEASE oSpellIt
>
>When I run the form and click the button I get the following error message:
>
>'Object is not contained in a form'
>
>Can someone please tell me what I am doing wrong!
>
>Thanks in advance,
>Russell
Russell,
It looks like you are passing a reference to ThisForm, to an object that is not in the forms collection.
Try:
LOCAL oSpellIt
SET CLASSLIB TO spellbound ADDITIVE
oSpellIt = CREATEOBJECT('spellit')
oSpellIt.CheckSource = ThisForm.Name + ".edtComments.Value"
oSpellIt.DoCheck()
Tracy