I have a plugin with a device called Vars and have Attributes Var1 and Var2. I have a slider with the value Device Binding to {Binding Vars.Var1}. In the plugin I am only using the onChangeRequest and for now I have a single line of code to test with.
function onChangeRequest(device, attribute, value) {
device.Var2=device.Var1;
console.log("Var1 ="+device.Var1);
console.log("Var2 ="+device.Var2);
}
When I move the slider the plugin gets called as the console.logs display. But for some reason the device.Var1 shows ‘null’ and then so does device.Var2 getting it’s value from Var1. I added a label and tied the text to Vars.Var1 and it just blanks out, probably due to the null value. I set Var1 and Var2 to a value inside the plugin and once the plugin was triggered they had this value. Changing the slider now still called the plugin but the Slider.value was never set to Var1 like it should.
Another way I tried was to read a variable value inside the plugin. Is there a way to do that?
Jerry