Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange behaviour in deleting object
Message
From
08/08/2006 12:00:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Strange behaviour in deleting object
Miscellaneous
Thread ID:
01143804
Message ID:
01143804
Views:
55
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 ?
Next
Reply
Map
View

Click here to load this message in the networking platform