I think openHAB 5.2 introduced some more “visual” coding support, to e.g. highlight problems in the code. Nice feature!
But I’ve got a few scripts, which I call in other scripts or in rules, and to which I pass a few arguments. And if I use one of these parameters, the code editor complains that they’re not declared yet. Understandable, but a bit annoying:
As always, @rlkoshak has the answer, and faster than his shadow.
I’ve seen that there’s work being done with other JavaScript problems, although it’s been a while since I’ve read anything about it. Is the solution expected for 5.2.1?
If you are referring to the problem where a multi threaded exception gets thrown when you pass just about anything more complicated as l than a JS float to another rule, yes. The fix is in place and is flagged to be back ported.
The fix involved adding a javaify and jsify method so that only Java Objects get passed to another rule, never JS Objects. The jsify can covert the Java break to JS on the other side.