I have this method which is created on the fly through the solutionModel. In this method I want to use the split function. The line with the split function gives me the ‘unterminated string literal’ error. Does anybody have a clue what I can do about this? Tried some things but can’t see how I could fix the error.
Example code:
var script = "function TestMethod() {";
script += " var test = globals.testArray;";
script += " var counter = test.split('\n');"; // this line, specifically the split('\n'), gives the error
script += " application.output(counter.length);";
script += " }";
var addMethod = newform.newFormMethod(script);
Ok, got it to work by creating a global method which splits the input and returns the splitted output. But still, the compiler shouldn’t give an error right?!