Looking on how to refine a bug to send it to "bugs" forum, I found this strange loop behaviour:
(see example apagada.com/varios/tictactuc/tictacbug2.capx )
For (N in 0 to 8){
.. Create object X
.. Pick instance N {
.. .. Set property blah, blah, blah.
.. }
]
No object gets the blah, blah, blah property. If you use, instead:
For (N in 0 to 8){
.. Pick instance N {
.. .. Set property blah, blah, blah.
.. .. Create object X
.. }
]
Then all objects get the property, as intended.
At the other hand,
For (N in 0 to 8} {Create object X ...}
For each object X {Text.append "Blah blah blah"}
does nothing with text.
I don't really understand how to use loops in an event-ruled programming language. In fact, I use to add a condition like
"loopindex(N)>=maximum value" inside each loop to ensure some events execute after the loop.
Can anyone explain me how to place events in the loop?