Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Richmond
richmondmathewson at gmail.com
Wed Mar 19 10:05:29 EDT 2014
On 19/03/14 15:39, Klaus major-k wrote:
> Hi Tim,
>
> Am 19.03.2014 um 14:30 schrieb Tim Bleiler <bleiler at Buffalo.EDU>:
>
>> Hi,
>>
>> After doing a quick check, this problem has existed for at least a couple of versions, but I just noticed it.
>>
>> I've only checked on a Mac.
>> When a new field is created it appears to be empty but the htmlText of the field is <p></p>.
>> The number of lines reported for the field is 0.
>> The text of the field is empty but the htmlText of the field is not.
>> If you set the htmlText of the field to empty then test if the htmlText of the field is empty it is reported as false.
>> Are others seeing this and is it a bug?
> since <p></p> is in fact the HTML equivalent to "empty/no text" I would not consider this a bug :-)
Just tested this in both LC 6.6 and 4.5; and the result is just the same:
set up 2 fields, "f1" and "f2" and a button with this script:
on mouseUp
put the htmlText of fld "f1" into fld "f2"
end mouseUp
and you end up, indeed, with <p>/</p>
in field "f2"
____________________________
what is interesting is that if you run this in the Message box:
put empty into fld "f1"
the htmlText of fld "f1" is still <p></p>
------------------------------------
Which would argue that RunRev have set that like that intentionally.
I agree with Klaus!
Richmond.
>
>> Tim Bleiler, Ph.D.
>> Instructional Designer, HSIT
>> University at Buffalo
> Best
>
> Klaus
>
> --
> Klaus Major
> http://www.major-k.de
> klaus at major-k.de
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list