dulux-oz
May 25th, 2013, 08:42
Hi Guys,
Got a small coding problem. In C++ it would be a simple macro substitution (ie MacroName with the operands "&" and "." eg "&MacroName.)". However, I can't seem to get this straight - any help greatly appreciated.
Code:
local oMacro = "window.objectName" .. target[1];
oMacro.functionCall();
Notes:
(1) target[1] is set properly
(2) Error message = "attempt to call field 'functionCall' (a nil value)"
Cheers
Got a small coding problem. In C++ it would be a simple macro substitution (ie MacroName with the operands "&" and "." eg "&MacroName.)". However, I can't seem to get this straight - any help greatly appreciated.
Code:
local oMacro = "window.objectName" .. target[1];
oMacro.functionCall();
Notes:
(1) target[1] is set properly
(2) Error message = "attempt to call field 'functionCall' (a nil value)"
Cheers