textChanged is not invoked after cutting text
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
textChanged is not invoked after cutting text
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.
- Attachments
-
- textChanged.zip
- (928 Bytes) Downloaded 228 times
Kaveh
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: textChanged is not invoked after cutting text
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 ?
Same result fro me (lC indy 9.0.1)
It works with a simple "cut" message sent by a btn
Code: Select all
on mouseup
cut
end mouseup
What happens in standalone ?
https://alternatic.ch
Re: textChanged is not invoked after cutting text
Tested using ctrl + x on Win7 with Lc 9.0.2, and it doesn't count as a text changed event there, either. It *does* however on 'nix using Lc 6.x, so I'm guessing it is a bug?
-
- Livecode Opensource Backer
- Posts: 9440
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: textChanged is not invoked after cutting text
Hmm . . .
-
-
- Attachments
-
- Text Change.livecode.zip
- Here's the stack.
- (1020 Bytes) Downloaded 228 times
-
- Livecode Opensource Backer
- Posts: 9440
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: textChanged is not invoked after cutting text
I wonder why this does NOT seem to work:
when I've CUT some text?
Code: Select all
if the clipBoardData is not empty then
put "CRAP"
end if
-
- Livecode Opensource Backer
- Posts: 9440
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: textChanged is not invoked after cutting text
Cut
does not behave in the same way as delete
because delete involves an insertion point in a field
while cut involves selectedText.
does not behave in the same way as delete
because delete involves an insertion point in a field
while cut involves selectedText.
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: textChanged is not invoked after cutting text
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
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
Kaveh
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: textChanged is not invoked after cutting text
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
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
https://alternatic.ch
Re: textChanged is not invoked after cutting text
That is good to know Jean-Marc, of course, from our perspective (devs) it is important to work everywhere eh
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: textChanged is not invoked after cutting text
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
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
Kaveh
Re: textChanged is not invoked after cutting text
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.
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: textChanged is not invoked after cutting text
Hi All
Textchanged also doesn’t work when I put a letter by script into/after/before a field
Jean-Marc
Textchanged also doesn’t work when I put a letter by script into/after/before a field
Jean-Marc
https://alternatic.ch