openroberta-lab icon indicating copy to clipboard operation
openroberta-lab copied to clipboard

loop-variables aren't automatically deleted when removing the forLoop-block

Open PamoCurtis opened this issue 2 years ago • 2 comments

Describe the bug

2 problems:

  • using a loop-variable out of scope and then removing the initial forLoop-block does not remove the loop-variable
  • declaring at least two variables so that you can switch between them in the variableSet/Get-block, then removing the forLoop-block, you are still able to switch between the variable name from the removed variable back and forth as long as at least one variable is still named after the removed one

To Reproduce

Concentrating on the second problem because that includes the first one too:

  1. Create two forLoop-blocks ( or one forLoop-block and a global variable, that doesnt matter) Bildschirmfoto von 2022-03-17 12-37-01

  2. Create two or more variable-blocks, select the variable name of the forLoop-block and use it out of scope (e.g below the forLoop-block) Bildschirmfoto von 2022-03-17 12-38-41

  3. Remove the forLoop-block

  4. See error (you can even open the code-view and its generates the code even though it shouldn't) Bildschirmfoto von 2022-03-17 12-39-16

Expected behavior

  • The loop-variable should get deleted automatically when removing the forLoop-block, like it happens when removing the declaration of a global-variable

Example Program

example.xml.txt

PamoCurtis avatar Mar 17 '22 11:03 PamoCurtis

Ok, same happens when declaring a variable in a function-block, using a variables_set/get block out of scope and deleting the function-block

before deletion Bildschirmfoto von 2022-03-21 09-10-31

after deletion Bildschirmfoto von 2022-03-21 09-10-40

PamoCurtis avatar Mar 21 '22 08:03 PamoCurtis

Bug is still present

PamoCurtis avatar May 04 '22 13:05 PamoCurtis

Issue still exists on test server.

RaghuvirShirodkar avatar Mar 03 '23 07:03 RaghuvirShirodkar

Solved

bjost2s avatar Mar 08 '23 16:03 bjost2s