On Nov 3, 2011, at 4:26 PM, stephen barncard wrote:

> Answering my own dumb question:
> 
> on deleteAllGrcs
> 
>      put the number of grcs in cd 1 of stack "leo" into ngcs
> 
>      repeat with n = ngcs down to 1
> 
>            delete grc n of cd 1 of stack "leo"
> 
>      end repeat
> 
> end deleteAllGrcs
> 
> 
> the "down to" form is used in the loop is as I am using "the number of" to
> determine the existing grcs in a container (is there any other way?) and
> "the number of" order would change every time the first item is deleted..

...or just:

on deleteAllGrcs
   put the number of grcs in cd 1 of stack "leo" into nbrGrcs
   repeat nbrGrcs times
      delete grc 1 of cd 1 of stack "leo"
   end repeat
end deleteAllGrcs

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to