Problem with setting htmlText of field to empty in LiveCode 6.6RC2 - Found word(s) remove list in the Text body

Bob Sneidar bobsneidar at iotecdigital.com
Thu Mar 20 17:32:46 EDT 2014


Yes I agree that is odd. This could stumble you if you were conditionally putting empty into items, and then acting on an empty value. The last item would never get processed because it would no longer exist! It goes against the principle that for computers, empty is not the same as nothing. NULL is nothing. Empty is in terms of a Livecode string a value that still is taking up an address in memory.

I guess it’s one of those oddities of Livecode we learn to live with. I suppose if were an issue, I would use an array instead. But it is inconsistent, and so is deleting the last line if you put empty into it. After all, we have DELETE if we really wanted to REMOVE the last word or item or line. put empty into should not work differently just because it is the last token we are working with.

Bob


On Mar 19, 2014, at 23:08 , Kay C Lan <lan.kc.macmail at gmail.com<mailto:lan.kc.macmail at gmail.com>> wrote:

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




More information about the use-livecode mailing list