Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On Thu, Mar 20, 2014 at 3:28 AM, J. Landman Gay jac...@hyperactivesw.comwrote: 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 ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
So then the “empty” field *is* truly empty and it is the act of “looking” at the htmlText that causes the p/p tags. Schrödinger's cat may have more to say on this. -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web http://elementarysoftware.com/ email sc...@elementarysoftware.com office 1-800-615-0867 -- ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Scott I am in awe of how you have combined coding, physics and philosophy - I will now always think of Schrödinger's cat enclosed in p\p tags :) Scott Morrow wrote So then the “empty” field *is* truly empty and it is the act of “looking” at the htmlText that causes the p /p tags. Schrödinger's cat may have more to say on this. - Some are born coders, some achieve coding, and some have coding thrust upon them. - William Shakespeare Hugh Senior -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Problem-with-setting-htmlText-of-field-to-empty-in-LiveCode-6-6-RC2-tp4677196p4677278.html Sent from the Revolution - User mailing list archive at Nabble.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
Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Hi, After doing a quick check, this problem has existed for at least a couple of versions, but I just noticed it. I've only checked on a Mac. When a new field is created it appears to be empty but the htmlText of the field is p/p. The number of lines reported for the field is 0. The text of the field is empty but the htmlText of the field is not. If you set the htmlText of the field to empty then test if the htmlText of the field is empty it is reported as false. Are others seeing this and is it a bug? Tim Bleiler, Ph.D. Instructional Designer, HSIT University at Buffalo ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Hi Tim, Am 19.03.2014 um 14:30 schrieb Tim Bleiler blei...@buffalo.edu: Hi, After doing a quick check, this problem has existed for at least a couple of versions, but I just noticed it. I've only checked on a Mac. When a new field is created it appears to be empty but the htmlText of the field is p/p. The number of lines reported for the field is 0. The text of the field is empty but the htmlText of the field is not. If you set the htmlText of the field to empty then test if the htmlText of the field is empty it is reported as false. Are others seeing this and is it a bug? since p/p is in fact the HTML equivalent to empty/no text I would not consider this a bug :-) Tim Bleiler, Ph.D. Instructional Designer, HSIT University at Buffalo Best Klaus -- Klaus Major http://www.major-k.de kl...@major-k.de ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On Mar 19, 2014, at 9:39 AM, Klaus major-k wrote: Are others seeing this and is it a bug? since p/p is in fact the HTML equivalent to empty/no text I would not consider this a bug :-) Thanks Klaus, I thought I should check on that before putting in a bug report. It seemed too obvious to have been missed. It does create an odd condition by Livecode standards however that you can set the htmlText to empty, then immediately test if the htmlText is empty and it returns false. I suspect that could confuse some people. Out of curiosity, do you know how something ( p/p ) came to be regarded as equivalent to empty? 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Hi Tim, Am 19.03.2014 um 15:02 schrieb Tim Bleiler blei...@buffalo.edu: On Mar 19, 2014, at 9:39 AM, Klaus major-k wrote: Are others seeing this and is it a bug? since p/p is in fact the HTML equivalent to empty/no text I would not consider this a bug :-) Thanks Klaus, I thought I should check on that before putting in a bug report. It seemed too obvious to have been missed. It does create an odd condition by Livecode standards however that you can set the htmlText to empty, then immediately test if the htmlText is empty and it returns false. I suspect that could confuse some people. Out of curiosity, do you know how something ( p/p ) came to be regarded as equivalent to empty? sorry, not the slightest idea :-) Tim Best Klaus -- Klaus Major http://www.major-k.de kl...@major-k.de ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On 19/03/14 15:39, Klaus major-k wrote: Hi Tim, Am 19.03.2014 um 14:30 schrieb Tim Bleiler blei...@buffalo.edu: Hi, After doing a quick check, this problem has existed for at least a couple of versions, but I just noticed it. I've only checked on a Mac. When a new field is created it appears to be empty but the htmlText of the field is p/p. The number of lines reported for the field is 0. The text of the field is empty but the htmlText of the field is not. If you set the htmlText of the field to empty then test if the htmlText of the field is empty it is reported as false. Are others seeing this and is it a bug? since p/p is in fact the HTML equivalent to empty/no text I would not consider this a bug :-) Just tested this in both LC 6.6 and 4.5; and the result is just the same: set up 2 fields, f1 and f2 and a button with this script: on mouseUp put the htmlText of fld f1 into fld f2 end mouseUp and you end up, indeed, with p//p in field f2 what is interesting is that if you run this in the Message box: put empty into fld f1 the htmlText of fld f1 is still p/p Which would argue that RunRev have set that like that intentionally. I agree with Klaus! Richmond. Tim Bleiler, Ph.D. Instructional Designer, HSIT University at Buffalo Best Klaus -- Klaus Major http://www.major-k.de kl...@major-k.de ___ 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 ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On 19/03/14 16:02, Tim Bleiler wrote: On Mar 19, 2014, at 9:39 AM, Klaus major-k wrote: Are others seeing this and is it a bug? since p/p is in fact the HTML equivalent to empty/no text I would not consider this a bug :-) Thanks Klaus, I thought I should check on that before putting in a bug report. It seemed too obvious to have been missed. It does create an odd condition by Livecode standards however that you can set the htmlText to empty, then immediately test if the htmlText is empty and it returns false. I suspect that could confuse some people. Out of curiosity, do you know how something ( p/p ) came to be regarded as equivalent to empty? Well, of course that's logically fairly crappy. The way to test if an htmlField is empty is surely something like this: if the htmlText of fld f1 is not p/p then put Yippee-Do, 'tis empty my friend! end if Richmond. 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 ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Hi Tim, Why would you want to do this? To make a field empty, just put empty into the field and if you want you can test that it is empty: put empty into fld 1 put (fld 1 is empty) -- true This clears the text, the htmlText, the unicodeText and the rtfText of the field. Why would you want to test that only the htmlText is 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 15:02, Tim Bleiler wrote: On Mar 19, 2014, at 9:39 AM, Klaus major-k wrote: Are others seeing this and is it a bug? since p/p is in fact the HTML equivalent to empty/no text I would not consider this a bug :-) Thanks Klaus, I thought I should check on that before putting in a bug report. It seemed too obvious to have been missed. It does create an odd condition by Livecode standards however that you can set the htmlText to empty, then immediately test if the htmlText is empty and it returns false. I suspect that could confuse some people. Out of curiosity, do you know how something ( p/p ) came to be regarded as equivalent to empty? 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On Mar 19, 2014, at 10:07 AM, Richmond wrote: Well, of course that's logically fairly crappy. The way to test if an htmlField is empty is surely something like this: if the htmlText of fld f1 is not p/p then put Yippee-Do, 'tis empty my friend! end if Sure, it's easy to deal with and I can live with it, but I do wonder why empty is not empty in this one case. 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On 19/03/14 16:09, Mark Schonewille wrote: Hi Tim, Why would you want to do this? To make a field empty, just put empty into the field and if you want you can test that it is empty: put empty into fld 1 put (fld 1 is empty) -- true This clears the text, the htmlText, Not exactly: put empty into fld 1 still leaves pp/ in the field, OR, at least when one does something like this: put the htmlText of fld 1 into fld 2 one ends up with pp/ in fld 2. Richmond. the unicodeText and the rtfText of the field. Why would you want to test that only the htmlText is 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 15:02, Tim Bleiler wrote: On Mar 19, 2014, at 9:39 AM, Klaus major-k wrote: Are others seeing this and is it a bug? since p/p is in fact the HTML equivalent to empty/no text I would not consider this a bug :-) Thanks Klaus, I thought I should check on that before putting in a bug report. It seemed too obvious to have been missed. It does create an odd condition by Livecode standards however that you can set the htmlText to empty, then immediately test if the htmlText is empty and it returns false. I suspect that could confuse some people. Out of curiosity, do you know how something ( p/p ) came to be regarded as equivalent to empty? 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 ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On Mar 19, 2014, at 10:09 AM, Mark Schonewille wrote: This clears the text, the htmlText, the unicodeText and the rtfText of the field. Why would you want to test that only the htmlText is empty? Yes, all true, it's definitely easy to deal with. I stumbled on it by accident and thought it was odd behavior that could be confusing to people. 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On 19/03/14 16:10, Tim Bleiler wrote: On Mar 19, 2014, at 10:07 AM, Richmond wrote: Well, of course that's logically fairly crappy. The way to test if an htmlField is empty is surely something like this: if the htmlText of fld f1 is not p/p then put Yippee-Do, 'tis empty my friend! end if Sure, it's easy to deal with and I can live with it, but I do wonder why empty is not empty in this one case. When I was a kid I wondered why babies were born the way they were, rather than in hygienically packaged eggs like chickens. Richmond. 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 ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On Mar 19, 2014, at 10:14 AM, Richmond wrote: When I was a kid I wondered why babies were born the way they were, rather than in hygienically packaged eggs like chickens. Great! Thanks, Richmond. Now I've got to worry about that, too! 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
To me it looks like the engine wraps the html in opening and closing tags, and when there is no content it forgets to take them off. I think the logical concept of empty outweighs the technical meaning of the html and it's a bug. On March 19, 2014 9:02:28 AM CDT, Tim Bleiler blei...@buffalo.edu wrote: On Mar 19, 2014, at 9:39 AM, Klaus major-k wrote: It does create an odd condition by Livecode standards however that you can set the htmlText to empty, then immediately test if the htmlText is empty and it returns false. I suspect that could confuse some people. -- 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Hi Tim, Am 19.03.2014 um 15:18 schrieb Tim Bleiler blei...@buffalo.edu: On Mar 19, 2014, at 10:14 AM, Richmond wrote: When I was a kid I wondered why babies were born the way they were, rather than in hygienically packaged eggs like chickens. Great! Thanks, Richmond. Now I've got to worry about that, too! :-D :-D :-D Tim Best Klaus -- Klaus Major http://www.major-k.de kl...@major-k.de ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On Mar 19, 2014, at 10:18 AM, J. Landman Gay wrote: To me it looks like the engine wraps the html in opening and closing tags, and when there is no content it forgets to take them off. I think the logical concept of empty outweighs the technical meaning of the html and it's a bug. Being a contrarian again, Jacqueline? I was all set to forget about this. I really hate posting bug reports that aren't bugs but I agree with you on this from my Livecode centric world view. Anyone else have any insights into the Livecode riddle of when is empty not really empty? 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Richmond, That's a matter of interpretation. By clearing the htmlText I mean resetting it to p/p. -- 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 15:12, Richmond wrote: On 19/03/14 16:09, Mark Schonewille wrote: Hi Tim, Why would you want to do this? To make a field empty, just put empty into the field and if you want you can test that it is empty: put empty into fld 1 put (fld 1 is empty) -- true This clears the text, the htmlText, Not exactly: put empty into fld 1 still leaves pp/ in the field, OR, at least when one does something like this: put the htmlText of fld 1 into fld 2 one ends up with pp/ in fld 2. Richmond. ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Jacque, In the past 15 years I never had any problems with htmlText always containing p tags, even if the text of the field was empty. Therefore, I think it is no bug. -- 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 We have time for new software development projects. Contact me for a quote. On 19 mrt 2014, at 15:18, J. Landman Gay wrote: To me it looks like the engine wraps the html in opening and closing tags, and when there is no content it forgets to take them off. I think the logical concept of empty outweighs the technical meaning of the html and it's a bug. ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On 19/03/14 16:30, Mark Schonewille wrote: Richmond, That's a matter of interpretation. By clearing the htmlText I mean resetting it to p/p. Well, now we have 2 conumdrums for the price of one: 1. When is 'empty' empty? 2. When does clearing the text clear the text? Well; even if nothing else, some of us have had a wee drop of fun at a slack time in the week :) Richmond. -- 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 15:12, Richmond wrote: On 19/03/14 16:09, Mark Schonewille wrote: Hi Tim, Why would you want to do this? To make a field empty, just put empty into the field and if you want you can test that it is empty: put empty into fld 1 put (fld 1 is empty) -- true This clears the text, the htmlText, Not exactly: put empty into fld 1 still leaves pp/ in the field, OR, at least when one does something like this: put the htmlText of fld 1 into fld 2 one ends up with pp/ in fld 2. Richmond. ___ 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 ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On Mar 19, 2014, at 10:30 AM, Mark Schonewille wrote: That's a matter of interpretation. By clearing the htmlText I mean resetting it to p/p. On Mar 19, 2014, at 10:35 AM, Mark Schonewille wrote: Jacque, In the past 15 years I never had any problems with htmlText always containing p tags, even if the text of the field was empty. Therefore, I think it is no bug. It seems inconsistent by Livecode conventions, though. I hit it because I was doing a lot of htmlText work and the null condition came up so I just tested against the htmlText property instead of the text. When I discovered what was actually in the property I quickly moved on. But, I've been doing this for 20 years and it didn't really slow me down much but wouldn't a beginner be pretty confused by this? 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Tim, I would expect a real beginner to use the put command: put fld x into fld y put something into fld x put fld y into something etc. Once your going to use htmlText, perhaps you're not a real beginner anymore. It seems you have a lot of experience with other programming language. Perhaps that's te culprit and not being a beginner. -- 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 We have time for new software development projects. Contact me for a quote. On 19 mrt 2014, at 15:37, Tim Bleiler wrote: It seems inconsistent by Livecode conventions, though. I hit it because I was doing a lot of htmlText work and the null condition came up so I just tested against the htmlText property instead of the text. When I discovered what was actually in the property I quickly moved on. But, I've been doing this for 20 years and it didn't really slow me down much but wouldn't a beginner be pretty confused by this? 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On 19/03/14 16:45, Mark Schonewille wrote: Tim, I would expect a real beginner to use the put command: put fld x into fld y put something into fld x put fld y into something etc. Once your going to use htmlText, perhaps you're not a real beginner anymore. It seems you have a lot of experience with other programming language. Perhaps that's te culprit and not being a beginner. If you try PUTIN you are a real beginner, or an uncritical Greater-Russian Imperialist . . . LOL - As soon as one starts using set the htmlText of fld 2 to the htmlText of fld 1 or set the unicodeText of fld 2 to the unicodeText of fld 1 numToChar(1852) one is no longer completely green. --- Mind you; even the conceptual leap from using 'field' to 'fld' shows that one has been mucking around for a while :) Richmond. -- Best regards, Mark Schonewille ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
I do not see this as a bug. Is it possible that there is some HTML convention that requires some kind of tag/ending tag to be present for a page to be considered an html page? And I agree with Richmond that if a field is empty, there is NO POSSIBLE WAY for the HTML Text of the field to be anything other than p/p, so I am struggling to see when this would present an impassible problem. Bob On Mar 19, 2014, at 07:18 , J. Landman Gay jac...@hyperactivesw.com wrote: To me it looks like the engine wraps the html in opening and closing tags, and when there is no content it forgets to take them off. I think the logical concept of empty outweighs the technical meaning of the html and it's a bug. On March 19, 2014 9:02:28 AM CDT, Tim Bleiler blei...@buffalo.edu wrote: On Mar 19, 2014, at 9:39 AM, Klaus major-k wrote: It does create an odd condition by Livecode standards however that you can set the htmlText to empty, then immediately test if the htmlText is empty and it returns false. I suspect that could confuse some people. -- 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 ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On Mar 19, 2014, at 11:25 AM, Bob Sneidar wrote: I do not see this as a bug. Is it possible that there is some HTML convention that requires some kind of tag/ending tag to be present for a page to be considered an html page? And I agree with Richmond that if a field is empty, there is NO POSSIBLE WAY for the HTML Text of the field to be anything other than p/p, so I am struggling to see when this would present an impassible problem. It's certainly not an impassible problem and I don't think it's a bug either. It is a little inconsistent from a strict Livecode perspective and might cause some confusion. The key concept to remember, for newbies and old farts like me alike, is that the htmlText is a property for FORMATTING text, it is not THE TEXT. Use it with respect and caution. Maybe a little clarification in the htmlText entry of the dictionary would be sufficient. 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On 3/19/14, 9:35 AM, Mark Schonewille wrote: In the past 15 years I never had any problems with htmlText always containing p tags, even if the text of the field was empty. Therefore, I think it is no bug. I haven't had any problem with it either, but that doesn't mean it isn't a bug. Consider this, which is very similar to what my current project does: A user enters some styled text into a field. The text is stored as htmltext in a custom property. Because the field is a background field, there may be many of these properties per field, and the correct text is displayed based on the stack's current status. In my project, a preOpenCard handler looks for the correct property to determine which text to display. In some cases the script needs to determine whether the custom property has content or not in order to take action. Because the text in the field may not be the text that needs to be checked, the custom property is checked. If it contains paragraph tags, it isn't empty and the script fails. (In my case this doesn't matter; in other cases it could.) I anticipate you will say don't put anything in the custom property if you plan to check it -- but if the content is set by the user then we have no control over that. And I agree -- if there is no content, then the engine should not put anything into the custom property. It isn't difficult to script around the behavior but I think it shouldn't happen in the first place. And it does defy the definition of empty. -- 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On 3/19/14, 10:25 AM, Bob Sneidar wrote: I am struggling to see when this would present an impassible problem. I grant that it's trivial and not a high priority. But it makes the language inconsistent, and I see that as the primary issue. I gave an example in another post of how it could affect scripts. Try this in a newly created field with no content: set the cText of this cd to the htmltext of fld 1 put (the cText of this cd = empty) Empty is no longer empty. Sometimes it will matter. -- 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On 19.03.2014 at 10:29 Uhr -0400 Tim Bleiler apparently wrote: Being a contrarian again, Jacqueline? I was all set to forget about this. I really hate posting bug reports that aren't bugs but I agree with you on this from my Livecode centric world view. Anyone else have any insights into the Livecode riddle of when is empty not really empty? I believe Jacque is on the right track and this is a side-effect of the way htmltext was implemented as an add-on (afterthought?) to the existing field. My guess would be, which can be confirmed by someone snooping the code, that htmltext always wraps the field content in the p tag pair before returning it and it does not bother to check whether the field is empty. Whether this is a bug or not is a matter of opinion. Documenting it might be an easy way out. RObert ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
I'm with Jacque - definitely a bug - Some are born coders, some achieve coding, and some have coding thrust upon them. - William Shakespeare Hugh Senior -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Problem-with-setting-htmlText-of-field-to-empty-in-LiveCode-6-6-RC2-tp4677196p4677238.html Sent from the Revolution - User mailing list archive at Nabble.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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On Mar 19, 2014, at 9:57 AM, J. Landman Gay jac...@hyperactivesw.com wrote: On 3/19/14, 10:25 AM, Bob Sneidar wrote: I am struggling to see when this would present an impassible problem. I grant that it's trivial and not a high priority. But it makes the language inconsistent, and I see that as the primary issue. I gave an example in another post of how it could affect scripts. Try this in a newly created field with no content: set the cText of this cd to the htmltext of fld 1 put (the cText of this cd = empty) Empty is no longer empty. Sometimes it will matter. HtmlText is an odd beast. I think Robert may be on the right track when he wonders about it being an add-on. Try this: Paste the following html list markup in field source: ol liList item 1/li liList item 2/li /ol Now use it as the source to set the htmlText of another field dest: set the htmlText of fld dest to fld source Now examine the htmlText of fld dest. You get this: ol type=1 li pList item 1/p /li li pList item 2/p /li /ol Now manually select the text in fld dest and hit delete. The contents of fld dest looks like this: 1. No matter what you do you can't manually delete the first list item marker. The htmlText of dest now looks like this: ol type=1 li p/p /li /ol The field thinks it's a list and you can't change it's mind. Unless you do this: put empty into fld dest At which point the htmlText is p/p. Which is where this all started. :) We had an interesting discussion of the html list issue in the Quality Control center a couple of years ago: http://quality.runrev.com/show_bug.cgi?id=9342 Best, Devin Asay Learn to code with LiveCode University http://university.livecode.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
RE: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
+1 Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Dave Kilroy Sent: Wednesday, March 19, 2014 1:45 PM To: use-revolut...@lists.runrev.com Subject: Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2 I'm with Jacque - definitely a bug - Some are born coders, some achieve coding, and some have coding thrust upon them. - William Shakespeare Hugh Senior -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Problem-with-setting-htmlText -of-field-to-empty-in-LiveCode-6-6-RC2-tp4677196p4677238.html Sent from the Revolution - User mailing list archive at Nabble.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 ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
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. Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Jacque, I don't agree and the solution is simple: just include a statement in the docs that the htmlText property is never empty but always returns at least one pair of p tags. -- 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 16:45, J. Landman Gay wrote: On 3/19/14, 9:35 AM, Mark Schonewille wrote: In the past 15 years I never had any problems with htmlText always containing p tags, even if the text of the field was empty. Therefore, I think it is no bug. I haven't had any problem with it either, but that doesn't mean it isn't a bug. Consider this, which is very similar to what my current project does: A user enters some styled text into a field. The text is stored as htmltext in a custom property. Because the field is a background field, there may be many of these properties per field, and the correct text is displayed based on the stack's current status. In my project, a preOpenCard handler looks for the correct property to determine which text to display. In some cases the script needs to determine whether the custom property has content or not in order to take action. Because the text in the field may not be the text that needs to be checked, the custom property is checked. If it contains paragraph tags, it isn't empty and the script fails. (In my case this doesn't matter; in other cases it could.) I anticipate you will say don't put anything in the custom property if you plan to check it -- but if the content is set by the user then we have no control over that. And I agree -- if there is no content, then the engine should not put anything into the custom property. It isn't difficult to script around the behavior but I think it shouldn't happen in the first place. And it does defy the definition of empty. ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
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. 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 Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.html On Wed, Mar 19, 2014 at 11:36 AM, Scott Rossi sc...@tactilemedia.comwrote: 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. Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design ___ 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 ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On Wed, Mar 19, 2014 at 2:36 PM, Scott Rossi sc...@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. -- Trevor DeVore Blue Mango Learning Systems www.screensteps.com-www.clarify-it.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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
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 sc...@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. ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
Using html was an example. If you have p/p in an HTML file, the browser will still render the HTML as empty. Of course there are tons of tags will accomplish the same. And if the HTMLtext is limited to a field, then the field is essentially the entire document. The HTML isn't describing the content of a stack, just the field's content. Both p/p and no text at all both count as empty when it comes to *viewing* HTML. So it would seem both are valid as far as HTML is concerned. But the two situations are different when it comes to code. BTW, I'm not proposing LiveCode *should* return p/p as a default for empty HTML text, but I think it should be allowed to do so. Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design On 3/19/14 12:08 PM, Trevor DeVore li...@mangomultimedia.com wrote: On Wed, Mar 19, 2014 at 2:36 PM, Scott Rossi sc...@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. -- Trevor DeVore Blue Mango Learning Systems www.screensteps.com-www.clarify-it.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 ___ 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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
On Wed, Mar 19, 2014 at 3:24 PM, Scott Rossi sc...@tactilemedia.com wrote: Using html was an example. If you have p/p in an HTML file, the browser will still render the HTML as empty. Of course there are tons of tags will accomplish the same. Ah, but if you had a style applied to p that shows a border then the border would be rendered by the browser. So from a DOM point of view you do have a line. p { border: 1px solid red; } So if I were to put the htmltext of an empty field into an HTML document I would end up with an object in the DOM that I wouldn't necessarily expect to be there. That being said, I don't think the hmltext property is designed to behave like I am interpreting it and I think I've changed my mind. I just looked at the styledText and it also returns an array with 1 line, even if there is no text: 1 runs: So, like Mark said, you can identify the type of formatting that a variable contains based on these indicators. p/p for htmlText, an array for styledText, etc. So while I agree that it isn't intuitive at first (I was stumped by this when I first started working with htmltext/styledText and empty content) it probably is the appropriate behavior. Now, looking at Jacque's example, I wonder if the language could help us here (at least in the future). Her example involved storing the htmltext of a field somewhere and then checking the value later on to see if it is empty. What if you could check a text length property of a variable to get the number of characters? if the text length of the cMyHTMLTextValue of me is 0 then ... This could, of course, be scripted right now on your own. But it might be a nice way of checking the string length of any variable that holds text in any format. Just an idea. It may be better to just leave it up to the developer to know the format they are storing the text data in and do the appropriate checks. -- Trevor DeVore Blue Mango Learning Systems www.screensteps.com-www.clarify-it.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
Re: Problem with setting htmlText of field to empty in LiveCode 6.6 RC2
I keep having this niggling feeling that the devs did this for some good reason, and that if empty text didn’t correspond to p/p in htmlText, the engine would choke, cough and sputter when it discovered to it’s horror that the htmlText of anything was literally empty. Either way, I’m still going to sleep well tonight. Bob On Mar 19, 2014, at 13:46 , Trevor DeVore li...@mangomultimedia.commailto:li...@mangomultimedia.com wrote: So if I were to put the htmltext of an empty field into an HTML document I would end up with an object in the DOM that I wouldn't necessarily expect to be there. That being said, I don't think the hmltext property is designed to behave like I am interpreting it and I think I've changed my mind. I just looked at the styledText and it also returns an array with 1 line, even if there is no text: ___ 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