deleting multiple controls all at once

MisterX b.xavier at internet.lu
Sun Feb 12 07:35:52 EST 2006


 
Dick

your loop works faster IF the number of controls < the number of "thing"
controls.

otherwise it will take longuer.

what's needed here is a control

create all your controls in a  group "things".

Then it's easier to delete group n controls in a group than among other
controls.

repeat while there is a contorl 1 of grp "things"
  delete control 1 of group "things"
end repeat

or even better

delete group "things"

cheers
Xavier
http://monsieurx.com


> If 300 isn't a meaningful number for your app, then you can 
> do without it:
> 
> repeat with n = number of controls down to 1
>   if char 1 to 6 of the short name of control n is "thing." then
>     delete control n
>   end if
> end repeat
> 
> -- Dick
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage 
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list