You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In theory, the blocks should be bounced out of the conditional, since they're both wrong (I'd rather only one bounce out, but this is fine too). This is what happens with simpler checks, e.g., if I change a "variables_get" block inside of a "control_repeat" block (which expects a "Number" output). However, nothing happens UNTIL I click one of the blocks in question, at which time the separation occurs.
I assume this happens because the onchange() function for the "logic_compare" block doesn't get triggered by a setOutput() call. If this is normal behavior, I'd be very interested if there's a way to sanely force this kind of update. I was hoping workspace.render would do it, but it didn't seem to make a difference.
The text was updated successfully, but these errors were encountered:
It looks like setOutput(..), and probably several other methods, do not fire a ChangeEvent. We probably need to, at least when the block has already been added to a workspace. We'll have to be careful not to introduce too many events during block/toolbox/workspace loading, but most (all?) of those change occur before the Block is added anywhere.
The issue still persists as of April 2023. Are there any workarounds?
There's no great work around! But when you trigger setOutput or setCheck you could disconnect and reconnect the output connection. This will trigger a change event, which will trigger the logic_compare block to update. I hope that helps!
So, perhaps this is the expected behavior, but I think there's a minor issue with setOutput when it comes to logic_compare blocks.
So say I have a "logic_compare" between a literal number and a variable.
And I run some bit of code to change the output type of the variable:
In theory, the blocks should be bounced out of the conditional, since they're both wrong (I'd rather only one bounce out, but this is fine too). This is what happens with simpler checks, e.g., if I change a "variables_get" block inside of a "control_repeat" block (which expects a "Number" output). However, nothing happens UNTIL I click one of the blocks in question, at which time the separation occurs.
I assume this happens because the onchange() function for the "logic_compare" block doesn't get triggered by a setOutput() call. If this is normal behavior, I'd be very interested if there's a way to sanely force this kind of update. I was hoping workspace.render would do it, but it didn't seem to make a difference.
The text was updated successfully, but these errors were encountered: