HTMLText question

Devin Asay devin_asay at
Tue Dec 15 15:47:43 EST 2009

On Dec 15, 2009, at 1:33 PM, dunbarx at wrote:

> Can I use the HTMLText property in a variable?
> In other words, why does this fail with an error?
> on mouseup
>    get fld "myField" --has a few words in it
>    set the htmlText of word 2 of it to "<box>word 2 of it</box>"
>    set the htmltext of fld "myField" to it
> end mouseup

Two problems: only fields have the htmlText property (as Jerry  
mentioned), and you're mixing literals and an expression. Try:

get fld "myField"
put "<box>" & word 2 of it & "<box>" into word 2 of it
set the htmlText of fld "myField" to it


Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

More information about the use-livecode mailing list