Hi Paul, > Am 28.10.2019 um 22:47 schrieb Paul Dupuis via use-livecode > <use-livecode@lists.runrev.com>: > > On 10/28/2019 5:40 PM, Klaus major-k via use-livecode wrote: >> Hi Paul. >> .... >>> It sounds like a bug that should be reported. If there is text in a field >>> (regardless of how it go there (paste, drag drop, typing, or by script) and >>> it is selected, the the selection, selectedChunk,a dn all related >>> properties should be set. If the text as placed in a field by any means >>> other than script (paste, typing, drag drop) a textChanged message should >>> be sent. I don't think textChanged is sent if a script changes the text. >> YEAH, TEXTCHANGED is what I should use! >> This does what I need: >> ---------------------------------- >> command doit >> put the selectedtext of me >> end doit >> >> on textChanged >> send "doit" to me in 10 >> end textChanged >> ------------------------------------ >> Thank you very much! :-) >> >> However "selectionchanged" should also be triggered, not? > > If there was not a selection in the field and now there is a visible > selection (as you described) then, yes, a selectionChanged message and, to > me, more importantly, functions like: > > However "the selectedtext of fld xyz" is reported to be empty > so is "the selection" and "the selectedchunk" returns the insertion point > right BEFORE the file has been dropped -> char 75 to 74 of fld xyz > > Should reflect the visible selection. If this is not the case, this should be > reported as a bug - one that I would CC myself on since it could impact my > apps.
Sure, will report this tomorrow! Again, thanks for pointing me to "textchanged"! :-) Best Klaus -- Klaus Major https://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