Page 1 of 1
textChanged is not invoked after cutting text
Posted: Sat Jan 19, 2019 10:27 am
by kaveh1000
Working on Mac with latest Community version of LC. Cutting text via menu or keyboard shortcut does not invoke textChanged handler. (But pasting does.) Please see attached minimal example.
Re: textChanged is not invoked after cutting text
Posted: Sat Jan 19, 2019 11:32 am
by jmburnod
Hi,
Same result fro me (lC indy 9.0.1)
It works with a simple "cut" message sent by a btn
I wonder if that is an IDE behavior
What happens in standalone ?
Re: textChanged is not invoked after cutting text
Posted: Sat Jan 19, 2019 11:58 am
by bogs
Re: textChanged is not invoked after cutting text
Posted: Sat Jan 19, 2019 1:03 pm
by richmond62
Re: textChanged is not invoked after cutting text
Posted: Sat Jan 19, 2019 1:07 pm
by richmond62
I wonder why this does NOT seem to work:
Code: Select all
if the clipBoardData is not empty then
put "CRAP"
end if
when I've CUT some text?
Re: textChanged is not invoked after cutting text
Posted: Sat Jan 19, 2019 5:56 pm
by richmond62
Cut
does not behave in the same way as delete
because delete involves an insertion point in a field
while cut involves selectedText.
Re: textChanged is not invoked after cutting text
Posted: Tue Jan 22, 2019 10:35 am
by kaveh1000
Hi folks
Just an update that I have reported this and it has been confirmed as a regression bug:
https://quality.livecode.com/show_bug.cgi?id=21802
Thanks for your comments on this.
Kaveh
Re: textChanged is not invoked after cutting text
Posted: Tue Jan 22, 2019 12:02 pm
by bogs
Good job on that Kaveh, we got to keep Panos hammer swinging on those bugs
Re: textChanged is not invoked after cutting text
Posted: Tue Jan 22, 2019 12:17 pm
by jmburnod
Hi All,
It seems that only concern IDE.
I played with an edit menu created with menu builder and it send a textchanged message on idE or standalone and shortcuts work as expected in standalone (LC 9.0.1 OSX 10.139
Best
Jean-Marc
Re: textChanged is not invoked after cutting text
Posted: Tue Jan 22, 2019 1:19 pm
by bogs
That is good to know Jean-Marc, of course, from our perspective (devs) it is important to work everywhere eh
Re: textChanged is not invoked after cutting text
Posted: Wed Feb 06, 2019 1:13 pm
by kaveh1000
Hi Folks
So cutting text will invoked in Standalone but not in IDE due to a bug. Is there any handler I can use in the meantime to detect when text has been cut?
Regards
Kaveh
Re: textChanged is not invoked after cutting text
Posted: Wed Feb 06, 2019 1:21 pm
by bogs
I would suspect you could use the clipboard, since we are talking about cutting/copying operations. One way might be to throw the clipboard contents into a variable, then check if the text in the variable changes.
Re: textChanged is not invoked after cutting text
Posted: Mon Feb 11, 2019 5:07 pm
by jmburnod
Hi All
Textchanged also doesn’t work when I put a letter by script into/after/before a field
Jean-Marc