Hi,
if nested "If" blocks do not work at all - is it possible to disable this option in Blockly?
(we didn't know it before - and it have taken long time while we understood this issue)
I think a lot of users can try to use it - and can not understand it, what happen
(BTW: is this a "missing feature" - or by design?)
Nested IF blocks
Moderator: leecollings
-
- Posts: 82
- Joined: Friday 24 October 2014 12:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Germany, near Berlin
- Contact:
Nested IF blocks
Michael Pruefer
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
-
- Posts: 10
- Joined: Saturday 13 June 2015 13:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2.2284
- Contact:
Re: Nested IF blocks
Hi,
I also found out nested Blockly scipts are not working! Very annoying!
What I think is also different with Blockly:
Normally if you use an IF DO / ELSE IF DO statement, the ELSE IF is only checked if the first IF is not true.
Blockly works different.
Example:
If all variables are 0 and the time is 17:00, all variables will be set to 1 with this script:
IF time > 13:00
DO set A = 1
ELSE IF time > 13:30
DO set B = 1
ELSE IF time > 14:00
DO set C = 1
ELSE IF time > 15:00
DO set D = 1
I always thought that only one DO can be executed in these kind of statements.
Regards,
Rob
I also found out nested Blockly scipts are not working! Very annoying!
What I think is also different with Blockly:
Normally if you use an IF DO / ELSE IF DO statement, the ELSE IF is only checked if the first IF is not true.
Blockly works different.
Example:
If all variables are 0 and the time is 17:00, all variables will be set to 1 with this script:
IF time > 13:00
DO set A = 1
ELSE IF time > 13:30
DO set B = 1
ELSE IF time > 14:00
DO set C = 1
ELSE IF time > 15:00
DO set D = 1
I always thought that only one DO can be executed in these kind of statements.
Regards,
Rob
-
- Posts: 82
- Joined: Friday 24 October 2014 12:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Germany, near Berlin
- Contact:
Re: Nested IF blocks
Right. You should use the full condition again in the "else" if.
It is really not an ELSE IF ... but an "OR IF"
It is really not an ELSE IF ... but an "OR IF"
Michael Pruefer
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
Who is online
Users browsing this forum: No registered users and 0 guests