htmlText and returns in a variable

Mark Swindell mdswindell at cruzio.com
Sun Nov 23 01:28:30 EST 2008


on mouseUp
     put "green gold tan" into Var1

    repeat for each word w in Var1
         put w&return after Var2
     end repeat

     replace gold with "<b>gold</b>" in Var2

     *set the htmltext of field 1 to Var2
     *put Var2 into field 1
end mouseUp

-----------------

In the preceding script:

Starred line 1 places "green gold tan" into field 1, with "gold" being  
bolded, but returns not respected.

Starred line 2 places
"green
gold
tan"
into field 1 with no bold type, but the returns are respected.

What I'm not understanding is:
  why aren't the returns maintained in   -- *set the htmltext of field  
1 to Var2 ?

What do I need to script to make each item appear on its own line?

Thanks,
Mark





More information about the use-livecode mailing list