Page 1 of 1

Event triggered by pasting data into a field

Posted: Sat Aug 03, 2024 3:56 am
by bbalmerTotalFluency
Good morning.

Is there one? An event triggered by pasting data into a field? I know we have textChanged but that does not appear to be triggered by pasting.

I'd like something to happen automatically on data being pasted into a field? Possible? If not possible, any smooth ways around it? I don't want the user to have to do something complicated or have to move the mouse out of the field to trigger the action (if possible).

Thanks

Re: Event triggered by pasting data into a field

Posted: Sat Aug 03, 2024 9:34 am
by jmburnod
Good Morning,
TextChanged works here (OSX 12.7.4, LC 9.66).
No tested as standalone.
Best regards
Jean-Marc

Re: Event triggered by pasting data into a field

Posted: Sat Aug 03, 2024 12:07 pm
by bbalmerTotalFluency
Jean-Marc:

DELETED

Re: Event triggered by pasting data into a field

Posted: Sat Aug 03, 2024 12:10 pm
by bbalmerTotalFluency
Jean-Marc:

Thanks for the reply. Well, I was expecting textChanged to work and it appeared not to have. But fortified by your resolute assurance of success, I tried again and this time it worked. I have NO explanation for why it did not work for me earlier. Human error being the most likely explanation.

Re: Event triggered by pasting data into a field

Posted: Sat Aug 03, 2024 1:17 pm
by Klaus
You could also catch the "pastekey" message.
However this will only work in a standalone, the IDE will just "eat" this message. :D

Re: Event triggered by pasting data into a field

Posted: Sun Aug 04, 2024 2:30 am
by bbalmerTotalFluency
Klaus:

Were I a university I would give you an honorary degree in all things livecode.

I saw pasteKey. I wondered if it would work. Tried it. It did not work. I did not know it was standalone only. That explains it.

It's an education chatting with you guys.

Thanks