Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Kay C Lan
lan.kc.macmail at gmail.com
Thu Mar 20 02:08:19 EDT 2014
On Thu, Mar 20, 2014 at 3:28 AM, J. Landman Gay <jacque at hyperactivesw.com>wrote:
> I just think it's wrong, purely for the sake of consistency in the
> language.
In some ways your argument is correct; as with my own pet peeve, what the
language does when putting empty into an item:
put 1,2,3,4 into tStore
put the number of items in tStore into msg --gives 4
put empty into item 2 of tStore
put empty into item 4 of tStore
put the number of items in tStore into msg --gives 3
So the language allows you to have an empty item, just as long as it's not
the last item. It's been explained to me that this is because of tokens
needed to delimit something as an item. The same applies for counting lines
as empty last lines are not counted. So it appears in this case that the
language is inconsistent (although to me appears logical) in that it
doesn't remove the tokens that are used to define what is html.
But on the other hand there are many cases in LC where empty is not empty:
set the defaultFolder to empty
put the defafaultFolder is empty into msg --result = false
Surely this, as with many other properties which when the user sets to
empty the language actually returns it to a default non-empty value, is
just another example. As previously advised, a simple case of a note in the
Dictionary to indicate that setting the HTMLText to empty results in a
default <p><\p>
More information about the use-livecode
mailing list