On Mar 19, 2014, at 2:36 PM, Scott Rossi 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>
> 
> So given what HTML is, checking if the HTML content of a field is empty
> doesn't really compare to checking if the code content of a field is empty.


On Mar 19, 2014, at 2:45 PM, Peter Haworth wrote:

> If the current behavior was changed, I'm sure it would cause backward
> compatibility problems.
> 
> If you want to check if a field is empty - if field "myField" is empty -
> works fine as does - if the text of field "myField" is empty


I think these views are correct. The fact that the htmlText is never really 
empty may not be as inconsistent as it seems at first. Many properties have 
ranges of specific values and if you try to set them to something outside of 
those ranges, the engine often throws an error. The engine is just being kind 
when it allows us to Set the htmlText of fld "My field" to empty, since this is 
apparently not technically valid. 

I agree with Peter that a change at this point would likely cause far more 
problems than it's worth. 

> 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.


Yes, I think this is the key take home point of the discussion.

Tim



_______________________________________________
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