General information
Category:
Forms & Form designer
Title:
Compiler directives in ControlSource?
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only