On 3/19/14, 1:45 PM, Peter Haworth wrote:
I'm not sure why this is such a problem.  Html isn't regular text and
shouldn't be treated as such, that's why htmltext is a separate property
from text.

It isn't a problem really, and it doesn't require immediate attention. I just think it's wrong, purely for the sake of consistency in the language. There is a difference between "no measureable content" and "empty". For example, a variable containing zero is not empty. Likewise, htmltext containing only tags should not be empty. (I notice the rtfText behaves the same way and returns a skeletal paragraph structure.) Now technically, paired "p" tags (in LC fields) indicate a line break, which also doesn't equate to empty. The engine apparently strips that off before setting the content of a field if that is the only thing in the htmltext; it has to, otherwise the field would contain a single carriage return -- which isn't empty.

Basically, empty should always mean entirely empty, not "empty most of the time except for these cases where you have to check something else to see if it's empty."

It really is a quibble, and easy to work around, though I don't really think changing the behavior would break anything since apparently the current way hasn't been noticed before. My only concern would be that it creates an unnecessary exception to the existing syntax.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to