Page 1 of 1

Repeat loop can't remove name

Posted: Tue Jun 11, 2019 2:24 am
by rrTea
I have a Repeat component that I named in order to use it in a specific way. But now I put the code in the While expression so I don't need to have a named component anymore. But I can't remove the name, I'm confused :D

Try to remove the name from the Repeat component and you will get a message that it is being used.
Try to remove the name from the Repeat component and you will get a message that it is being used.
剪貼簿圖片 (26).png (1.7 KiB) Viewed 5773 times

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application" FileVersion="2">
  <Content>
    <Repeat Name="loop_Cling">
      <WhileExp>
<![CDATA[//this.Iteration=current iteration nr. Return false to end loop.

int i;//
i = this.Iteration;]]>
      </WhileExp>
    </Repeat>
  </Content>
</ZApplication>
Edit: a bit of magic solves the problem! If I go to the While expression, ctrl-x all the code, remove the name and then ctrl-v back the same code the component remains nameless. Yupi!

Re: Repeat loop can't remove name

Posted: Tue Jun 11, 2019 8:24 am
by VilleK
Ok good you found a solution :). I guess the "this.Iteration" part refers internally to the component so ZGE gets confused.