Odd variable behavior
Hello, all,
I've got another head-scratcher. The following code is producing an error:
thisField = trim(form.thatField);
thisField = new components.myCFC().stripScript(variables.thisField);
form.thatField = variables.thisField;
Now, according to cfdocs.org, if you do not explicitly declare that a variable is to be saved in any scope, then the VARIABLES scope is the default scope that the variable will be saved in (ie, "thisVar = '';" is the same as "variables.thisVar = '';".)
So.. when I typed thisField = trim(form.thatField); then it should have default saved to the VARIABLES scope. But the second line is generating the error:
Element THISFIELD is undefined in VARIABLES.
??? Is this a bug? Am I missing something?
V/r,
^ _ ^
