set the text of line 4 of field id 123?

Bill Marriott wjm at wjm.org
Fri Jan 2 09:17:14 EST 2009


David,

Because "the text of" is a property of a field (button, image), not a 
line/chunk thereof. The HTMLText syntax specifically allows for chunks; Text 
does not. From the docs:

set the HTMLText of [chunk of] field to htmlString
set the text of {button | field | image} to string

It would appear you have a nice enhancement request for "the text of" 
property, but it's probably that way because HTMLText will always be text 
data, whereas the text of something could be binary.

David Bovill wrote,

> These work as expected:
>
> put newLine into line lineNum of field id fieldID
> set the htmltext of line lineNum of field id fieldID to newLine
>
> So why on earth does this not work?
>
> set the text of line lineNum of field id fieldID to newLine
>
> I've always found the properties (text and htmltext) of text fields 
> somewhat
> inconsistent, and can never remember the ins and outs - so I 'think" this
> has always been the case and is not a new bug in the beta. Can anyone make
> sense of this for me?






More information about the use-livecode mailing list