err.set_object_member("ERR", files_obj);
state.showCompileResult(err);
- return ret;
+ // do not set errors.. that's not done here..
+ return true;
}
- ret.set(line, errmsg); // depricated - this is used by the editor currently -- but we are planning to switch from that..
+ errors.set(line, errmsg); // depricated - this is used by the editor currently -- but we are planning to switch from that..
print("got errors\n");
- return ret;
+ return true;
}
// now syntax is OK.. try the
if (ptype == "file") {
- this.validateJavascriptCompression(file, state, code);
+ return this.javascriptHasCompressionErrors(file, state, code);
}
print("no errors\n");
- return ret;
+ return false;
}
- public void validateJavascriptCompression(JsRender.JsRender file, WindowState state, string code)
+ public bool javascriptHasCompressionErrors(JsRender.JsRender file, WindowState state, string code)
{
// this uses the roojspacker code to try and compress the code.
// it should highlight errors before we actually push live the code.
p.packFile(code, file.path,"");
state.showCompileResult(p.result);
+ if (p.hasErrors()) {
+ return true;
+ }
+ return false;