conditional formatting, how to do it

Bill Marriott wjm at wjm.org
Fri Jan 2 12:40:38 EST 2009


When using "repeat for each x in y" you MUST consider each of the referenced 
items (x and y) to be "read only."

>From the docs:

---
Important! In any of the for each loops, you should not change the 
labelVariable or container in a statement inside the loop. Doing so will not 
cause a script error, but will almost certainly produce unexpected results.
---

Additionally, you are trying to set the style of a variable, which would 
have no effect.

You would rather say:

repeat with i = 1 to the number of lines in fld "test"
    if word 1 of line i of fld "test" is "Sunday" then
        set the textStyle of line i of fld "test" to "bold"
    end if
end repeat 






More information about the use-livecode mailing list