Thursday, 19 September 2013

Coldfusion function variable name and CfBuilder

Coldfusion function variable name and CfBuilder

I need to call a function of an object and pass it a variable. Because I
need to make multiple call to function of this object I've tried to make
one only handler that invoke the specific function by the form value I
pass it. The code works, but cfbuilder show me that there is an error
(missing semicolon on the last row). I'm on Railo.
local.myReport = seoUtility.init();
local.func = form.action;
local.action = local.myReport;
local.report = local.myReport[local.func](form.user);
So the question is: this code is correct? I could simply ignore the
cfbuilder error icon?

No comments:

Post a Comment