Conversion Error from USUAL (OBJECT) to STRING
Posted: Fri May 17, 2019 10:22 pm
I ran into an error which I think shouldn't have occurred. Here is a scenario:
Class ClassA
PROPERTY zPolicy AS STRING AUTO
Class ClassB
METHOD PushButton1
LOCAL cOldPolicy AS STRING
cOldPolicy := ClassA:zPolicy
If I run this code without initializing zPolicy to empty string, I get this error, "Conversion Error from USUAL (OBJECT) to STRING." I put a break point on the assignment line. While debugging I see the value for zPolicy is NULL. The value for cOldPolicy is "".
Using EXPORT:
Class ClassA
EXPORT zPolicy AS STRING
Now the value for zPolicy is also "". No error. I was expecting PROPERTY zPolicy AS STRING AUTO to also initialize zPolicy to an empty string.
We are using VO dialect. Is there a setting I need to use to prevent this error? Thanks.
Class ClassA
PROPERTY zPolicy AS STRING AUTO
Class ClassB
METHOD PushButton1
LOCAL cOldPolicy AS STRING
cOldPolicy := ClassA:zPolicy
If I run this code without initializing zPolicy to empty string, I get this error, "Conversion Error from USUAL (OBJECT) to STRING." I put a break point on the assignment line. While debugging I see the value for zPolicy is NULL. The value for cOldPolicy is "".
Using EXPORT:
Class ClassA
EXPORT zPolicy AS STRING
Now the value for zPolicy is also "". No error. I was expecting PROPERTY zPolicy AS STRING AUTO to also initialize zPolicy to an empty string.
We are using VO dialect. Is there a setting I need to use to prevent this error? Thanks.