line number in a for each repeat

Brian Yennie briany at qldlearning.com
Thu Apr 21 17:47:12 EDT 2005


> Yes that would work. I forgot because I am not used to the (new to me) 
> repeat for each and was more concerned if there was a way built into 
> the repeat that did it. I was so concerned that I forgot that I could 
> role my own.

Yah- many other languages supply a way to fetch the "key" as well as 
the value in these sort of structures, so it was a reasonable 
expectation! I guess since "for each" is sequential, it's easy enough 
to do without...

> I did end up using the lineoffset and that works for what I am doing, 
> but this would have been the way I did it before in SuperCard.

That'll work, but keep in mind it mostly defeats the speed of "for 
each". Incrementing a counter would preserve the speed advantage over 
other structures.

> PS.. I have decided to take on our Director programmer after reading 
> the threads about Adobe buying MM out. Before I felt that he had a lot 
> of time invested and although I knew I could do this I didn't want to 
> push him out. Now however I figured that it was a good time to 
> 'recreate' in REV what he has been doing in MM Director for the past 
> two years. I know REV can handle it especially since we are no longer 
> posting a live version straight on the web of our software.

Good luck!



More information about the use-livecode mailing list