I run some tests and looks like
FOR EACH has similar problem as
for i=1 TO ... when deleting items, it skips each even item. You'll have to stick with
for i = this.mycontainer.controlcount to 1>I built a container which I populate with a number of checkboxes depending on a certain table.
>To do that i removeobject all the checkboxes in the container, then addobjects again reading the table.
>
>I tried with
>
>for each oCheck in this.Mycontainer.objects
> if lower(oCheck.baseclass) == 'checkbox'
> this.removeobject(oCheck.name)
> endif
>endfor
>
>
>but i found out that one of the objects was not removed
>so i'm using this code
>
>
>for i = this.mycontainer.controlcount to 1
> if lower(this.mycontainer.controls(i).baseclass) == 'checkbox'
> this.mycontainer.removeobject(this.mycontainer.controls(i).name)
> endif
>endfor
>
>
>why that ?
--sb--