In some of our code, we have carry out certain bits of code based on a property value (eg. in our error logging routine, I log different information based on the value of a property in our error object). There are only a small set of valid values for this property and so I've #define'd the values in our header file.
However, I do not seem to be able to set the default value of a property to this constant. If I type the name into the property field, it generates code that assigns that name as a string to the property (1). If I implement it as an expression it tries to evaluate it as if it were a variable name which doesn't exist (2).
? "oError.LoggingCode : "
?? oError.LoggingCode
returns (1)
oError.LoggingCode : k_ERRLOG_DEFAULT
or (2)
oError.LoggingCode : .F.
The constant is definitely defined correctly, since the line following those above contains
? k_ERRLOG_DEFAULT
and returns
0
Can anyone tell me what I am doing wrong? If necessary I'll have to assign values to the field in the init event but that will render the ResetToDefault() function useless.
Thanks,
Rob Spencer
Quids Technology