Repeat for each line?

Magnus von Brömsen webmaster at studioalice.se
Thu Apr 18 03:11:01 EDT 2002


Hi all Experts.

I have one list field ("articles") with this handler:

on addOrder
   repeat for each line x in field "articles"
     if the foregroundColor of x = 204,0,0 then
     put x after redLine
     end if
   end repeat
   put redLine into field "order"
end addOrder

I want every line there the color of the text is 204,0,0 (red) to be put 
in the variable redLine. I have read the help-file about repeat  several 
times, but I cant solve it. Please help...
This is the error I get:

  • There was an Execution Error at 10:04:07 AM
Error description:  Object Name:
Object: field id 1281 of card id 1053 of stack "complete" of stack "/Big 
mama/Users/magnusvb/Documents/14 folder/STS 3 folder/Priser.rev"
--------------------
repeat for each line x in field "articles"
--------------------
Value: Basic	


The message "addOrder" is sent from a button outside the field:

on mouseUp
   send addOrder to field "articles"
end mouseUp

Thanks in advance
Magnus von Bromsen




More information about the use-livecode mailing list