repeat repeat

Mark Schonewille europe at ehug.info
Wed Mar 1 19:54:30 EST 2006


Hi Liam,

Assuming that your original code does not cause any errors, the 
following should work, although I didn't test it:

on mouseUp
   repeat for each item myLabel in fld "seatNo"
     repeat with x = 1 to the number of buttons
       if myLabel is the label of btn x then
         set the backgroundColor of btn x to red
       end if
     end repeat
   end repeat
end mouseUp

Instead of "item myLabel" you could also use "line myLabel".

Best,

Mark


liamlambert wrote:
> My fld "seatNo" has more than one line or item
> I want to repeat the code below for each line or item
> 
> 
> on mouseUp
>   put fld "seatNo" into tseatNo
>  repeat with x = 1 to the number of buttons
>  if tseatNo = the label of button x then
>       set the backgroundcolor of  button x to red
>   end if
>   end repeat
>     end mouseUp
> 
> Liam Lambert
> liamlambert at mac.com
> IRELAND

-- 

Consultant and Software Engineer
mailto:m.schonewille at economy-x-talk.com
http://www.economy-x-talk.com

eHUG coordinator
mailto:europe at ehug.info
http://www.ehug.info

Advertise with us and reach 1000 truely interested internet 
users every month. See http://economy-x-talk.com/advertise.html 
for more information.




More information about the Use-livecode mailing list