Sequential Layout of Script-created Objects

Jeanne A. E. DeVoto jeanne at runrev.com
Sun Dec 8 19:24:01 EST 2002


At 1:19 PM -0800 12/8/02, Bernard Devlin wrote:
>I used (a slightly modified version of) Jeanne's code, and I'm seeing some
>strange effects.

Richard is right, and I made a novice mistake in the repeat loop I posted
(that'll teach me not to test first): it should be

  repeat with x = the number of controls of group "grpButtons" \
      of stack "Map" down to 1

>What appears to be happening is that the number of controls is being reduced
>because of the deletions, and after a certain point the control to which the
>next x refers has been deleted.  This seems like strange behaviour to me.
>Should "the number of controls" be re-evaluated on each iteration of the loop?

No - it's only evaluated once.

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/





More information about the use-livecode mailing list