Looping Over Groups?

Richard Gaskin ambassador at fourthworld.com
Wed Sep 18 17:36:01 EDT 2002


Jim Biancolo wrote:

> I'm new to Revolution; please forgive in advance boneheaded questions.  I
> checked the docs and Google before posting and couldn't find an answer.
> 
> Is there a way to loop over the images in a group?  I tried these:
> 
> repeat for each image I in group "my_group"
> repeat for each item I in group "my_group"
> repeat for each object O in group "players_group"
> 
> All failed to compile.  Then I hit on:
> 
> repeat for each element E in group "players_group"
> 
> It compiled, but then when I tried to run it I got this error:
> 
> Error description:  Chunk: source is not a container
> 
> I fear I'm missing something obvious.  Any advice?

The "repeat for each" construct works only with text chunks, not objects.

Try:

  repeat with i = 1 to the number of images of grp "MyGroup"


-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list