line number in a for each repeat

Thomas McGrath III 3mcgrath at adelphia.net
Thu Apr 21 17:13:56 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.

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.

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.

Thanks

tom

On Apr 21, 2005, at 5:00 PM, Brian Yennie wrote:

> Thomas,
>
> You can always just add your own counter to the loop:
>
> put 0 into lineNumber
> repeat for each line x in theKeys
>     add 1 to lineNumber
>     ...
> end repeat
>
> HTH
>
> - Brian
>
>> I'm afraid that gets me "three" and not the line number 3 which is 
>> what I needed.
>>
>> I am now trying to use the lineoffset on the global using the short 
>> name of the target with the global list of images.
>>
>> Thank you
>>
>> On Apr 21, 2005, at 4:28 PM, Scott Rossi wrote:
>>
>>> Recently, Thomas McGrath III  wrote:
>>>
>>>> repeat for each line x in theKeys
>>>>      if  x = theKey then -- after the third sweep it comes to x = 
>>>> three
>>>>
>>>>        -- this is where I need the actual line number that three is 
>>>> in
>>>> theKeys global which in this case is 3
>>>> put line x into theblend -- doesn't work
>>>> --put the line number of x of theKeys into theblend -- doesn't work
>>>
>>>  put x into theBlend
>>>
>>> Regards,
>>>
>>> Scott Rossi
>>> Creative Director
>>> Tactile Media, Multimedia & Design
>>> -----
>>> E: scott at tactilemedia.com
>>> W: http://www.tactilemedia.com
>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>
>>>
>>
>> Thomas J. McGrath III
>> SCS
>> 1000 Killarney Dr.
>> Pittsburgh, PA 15234
>> 412-885-8541
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>

Thomas J. McGrath III
SCS
1000 Killarney Dr.
Pittsburgh, PA 15234
412-885-8541



More information about the use-livecode mailing list