Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using preprocessed directive in a property?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Using preprocessed directive in a property?
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01504362
Message ID:
01504362
Views:
97
Hi,

In an INIT method of a class the code sets a value of a property from a compile-time constant.
Here is an example:

The include file has a line:
#define CC_CODE 37

Then at run time, in the INIT method, the value is assigned to a property as following:
this.pass_code = CC_CODE

I would like to store the word "CC_CODE" in another property of this class so that instead of hard-coding the name, it would work as following (pseudo code):

At design time set value of some property as:
this.name_in_include_file = "CC_CODE"

At run time process this name to the value defined in the include file:
this.pass_code = this.name_in_include_file

But it does not work. I tried to use EVALUATE() but it does not work either.

Any suggestions? TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform