drag'n'drop in text fields

Brian Milby brian at milby7.com
Tue Oct 29 09:47:39 EDT 2019


It looks like selectionChanged only reacts to explicit user events (mouse click or cursor moved via keyboard navigation).  If I select a chunk of text in another app and drag it in, the same thing happens (it is selected but no selectionChanged message).  If I script a button to select a chunk, no message either.  No message is sent when you cut/paste over/delete a chunk of selected text.  When you paste in text, the selection changes (cursor position moves) but no message is sent.

I did my testing on a Mac.

I think it is probably more of a documentation issue based on how it works.

Thanks,
Brian
On Oct 28, 2019, 5:03 PM -0400, Klaus major-k via use-livecode <use-livecode at lists.runrev.com>, wrote:
> Hi all,
>
> quick question LC 9.5 on macOS 10.14.6:
>
> We can drag'n'drop text into textfields and
> this works without any scripting.
>
> We can also drag'n'drop one or more files into
> a textfield and the filepath appears in the field
> where we dropped the file(s).
>
> However there does not seem to be any message
> send to the field when dropping a file, but I want
> to catch it.
>
> I tried something like:
> --------------------------------
> on selectionChanged
> send "doit" to me in 10
> end selectionChanged
>
> command doit
> put the selection
> end doit
> --------------------------------
> However I can see the pathname is selected but nothing
> appears in the messagebox.
>
> What am I missing or what should I do instead?
>
> Thanks in advance!
>
>
> Best
>
> Klaus
> --
> Klaus Major
> https://www.major-k.de
> klaus at major-k.de
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list