Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compiler directives in ControlSource?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Compiler directives in ControlSource?
Miscellaneous
Thread ID:
00872778
Message ID:
00872778
Views:
65
1. Is there any way to have a controlsource of a control be an array element where the array element number is a compiler directive #define'd text? In other words, "s_data(ccn)" where the .h file has a line "#DEFINE ccn 2" instead of "s_data(2)"?

This is old app being converted which used scatter/gather to arrays and used the "named" array elements instead of numbers.
When the .spr tries to "do form", I get an error
"Object: ERROR LOADING FILE - RECORD NUMBER 25. TXTS_DATACCN19 -OR ONE OF ITS MEMBERS>. CONTROLSOURCE : VARIABLE 'CCN' IS NOT FOUND, Type: U, Eval:"

If I replace the 'CCN' in the S_data(ccn) ControlSource, the error doesn't occurs at that record number but instead occurs at the next control that has such a controlsource.

2. I thought that during the project or app build, the .h file caused "substitution" of all the #defines. "Shouldn't" the compiler substitute the number 2 for the text "ccn" in that CONTROLSOURCE?

If not, then until (and if) I convert the scatter/gather methodology, is there a way around this or am I going to have to do a whole bunch of strtrans on the .scx memo fields that have those controlsources?

Eric
Next
Reply
Map
View

Click here to load this message in the networking platform