Problem with setting htmlText of field to empty in LiveCode 6.6 RC2

Richmond richmondmathewson at gmail.com
Wed Mar 19 10:12:52 EDT 2014


On 19/03/14 16:09, Mark Schonewille wrote:
> Hi Tim,
>
> Why would you want to do this? To make a field empty, just put empty 
> into the field and if you want you can test that it is empty:
>
> put empty into fld 1
> put (fld 1 is empty) --> true
>
> This clears the text, the htmlText, 

Not exactly: "put empty into fld 1" still leaves "<p><p/>" in the field, 
OR, at least when one does something like this:

put the htmlText of fld 1 into fld 2

one ends up with "<p><p/>" in fld 2.

Richmond.

> the unicodeText and the rtfText of the field. Why would you want to 
> test that only the htmlText is empty?
>
>
> -- 
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other 
> colour spaces. http://www.color-converter.com
>
> Buy my new book "Programming LiveCode for the Real Beginner" 
> http://qery.us/3fi
>
> LiveCode on Facebook:
> https://www.facebook.com/groups/runrev/
>
> On 3/19/2014 15:02, Tim Bleiler wrote:
>>
>> On Mar 19, 2014, at 9:39 AM, Klaus major-k wrote:
>>
>>>> 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 :-)
>>
>>
>> Thanks Klaus, I thought I should check on that before putting in a 
>> bug report. It seemed too obvious to have been missed.
>>
>> It does create an odd condition by Livecode standards however that 
>> you can set the htmlText to empty, then immediately test if the 
>> htmlText is empty and it returns false. I suspect that could confuse 
>> some people.
>>
>> Out of curiosity, do you know how "something" ( <p></p> ) came to be 
>> regarded as equivalent to empty?
>>
>> Tim
>
>
> _______________________________________________
> 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