>Hi Ed and Jason,
>
>>It started to create an Object, so VARTYPE() became "O"; it did not instantiate so it's content became NULL. I'd bet that ISNULL(thisform.TextBox1.Text2) returned .T., too.
>
>If it were, it would still be a bug, VarType()'s second parameter:
>
>If lNullDataType is false (.F.) or omitted, VARTYPE( ) returns 'X', indicating that eExpression contains the null value.
It's interesting - the object ref exists and ISNULL() returns .f. - but the control is not a member of the Container Textbox2's Controls or Objects collection. The test scenario was to create the defines as shown do a SET PROC TO
prg containing defines. I then created a base form and added the following to the Init:
thisform.addobject('testbox','testbox')
prior to running the form, I did the following to expose the _Screen object in the locals:
oSc = _screen
I then ran the form, and explored the collections through the object ref.