conditional formatting, how to do it

Rob Cozens rcozens at pon.net
Fri Jan 2 12:19:10 EST 2009


Happy New Year Peter,

>I change this so as to do the formatting as follows:
>
>set the itemDelimiter to " "
>repeat for each line theLine in field "test" of stack "Calendar"
>if item 1 of theLine is "Sunday" then
>set the textStyle of theLine to "bold"
>end if
>end repeat
>
>and get the error
>
>Message execution error:
>Error description: Chunk: error in object expression
>
>So how to do this?  That is, make every line that starts with Sunday bold?
>And why is it not working?



Try:

         set the textStyle of line theLine of field "test" to "bold"

BTW, one can skip setting the itemDelimiter by substituting

         if word 1 of theLine is "Sunday" then

or

         if offset("Sunday ",theLine) = 1 then

your if statement.

Rob Cozens

"I cannot do great things;
  but I can do small things with great love."

         -- Mother Teresa 


More information about the Use-livecode mailing list