Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Mark Schonewille
m.schonewille at economy-x-talk.com
Wed Mar 19 15:20:38 EDT 2014
Trevor,
When a browser renders "<p></p>" it displays nothing.
Correct htmlText starts and ends with p tags. That's the LiveCode
convention. Anything else is not htmlText. Therefore, if a text is
empty, to have valid htmlText the propety still needs to return the tags.
Currently, we wil always know for sure whether data is htmlText or not.
If we remove the tags, there is no way to know if data is htmlText if
that data happens to be 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 20:08, Trevor DeVore wrote:
> On Wed, Mar 19, 2014 at 2:36 PM, Scott Rossi <scott at tactilemedia.com> wrote:
>
>> Maybe it helps (or hinders) to consider the fact the following renders as
>> empty in a web browser, even though clearly there is code content present:
>>
>> <html>
>> <body>
>> </body>
>> </html>
>>
>
> True. But doesn't <p></p> mean that you have 1 empty paragraph? I think
> that the HTML returned by LiveCode (1 empty paragraph) is different than
> what is present in the field (nothing).
>
> Since the htmltext is a property of a field, and no an entire document, I'm
> inclined to say that the htmltext should return empty and not <p></p> when
> there is not text present.
>
More information about the use-livecode
mailing list