Mike,
>All:
>I'm having a problem with a combobox sub-class. My problem is that the the boundto column (2), _EmpNum, is a 3 charactere field (013) that is a number expression, but vartypes as a"C".
>* BEGIN FORM1.DBEVEMPLCOMBO.INIT()
>
>this.value = eval(this.Fieldname)
>this.controlsource = (this.Fieldname)
>dodefault()
>
>RETURN .T.
After looking at your code that initializes the .value prop
Did you check this out?
luVal = evaluate(this.Fieldname)
? type("luVal")
This shows that the evaluate(this.Fieldname) is returning 'N'-numeric and not 'C'-character as you are thinking.
May I also suggest to avoid problems that from within you Init() you do:
Return Dodefault()
and not as like you did:
dodefault()
return .t.
Why?
Because if the init returns .f. the object won't be instantiated.
So if anything in the init of your superclass (called with dodefault()) should prevent the object from being instantiating you don't pass this back to the system. And you can end up with dangling object references etc....
Regards,