Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox display value goes blank
Message
From
08/07/1999 03:24:57
 
 
To
07/07/1999 07:49:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00238183
Message ID:
00238708
Views:
12
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,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform