Error when copying clipboard with a variable not existing at destination

Hi to all,
When a copied rule refers to a local variable that does not exist at destination you get a nasty error in your rule making it even impossible to delete the rule the classical way. I had to go trough the gear on the rule to be able to remove 'the cild' from the app.

The copied rule was the following :

Set vMath01 to (vLightLivingTable(16) * 45.0)
Add 2000 to vMath01
Color Temperature: Living.Light.Dining.Table.Group: vMath01(0 **invalid**)

While I omitted to create variable vMath01 locally first.

It should be obvious that copying actions that reference a local variable to another rule is not going to work if the destination rule doesn't have the exact same local variables. However, the rule shouldn't crash as yours did. The next release will protect against the crash. This would be the result of pasting in the copied actions:

If, however, the local variables are defined in the destination rule prior to pasting, then the paste works as expected.

2 Likes

Yes, absolutely. I agree that it is normal that the described behaviour should end up in an error. Avoiding the crash is perfect, thanks.

1 Like