drag'n'drop in text fields

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

drag'n'drop in text fields

Ralph DiMola via use-livecode
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
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
on dragDrop
  if "files" is among the keys of the dragData then
    put line 1 of the dragData["files"] -- or whatever
  end if
end dragDrop

on dragEnter
  set the dragAction to "copy"
end dragenter

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
http://forums.livecode.com/viewtopic.php?f=7&t=33269

Best, Richmond.

On 28.10.19 23:03, Klaus major-k via use-livecode 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
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
|local fldState on mouseEnter if fld "fff" is empty then put "0" into
fldState end mouseEnter on mouseWithin if fld "fff" is empty then -- do
nothing else put "1" into fldState end if if fldState > 0 then set the
textColor of fld "fff" to red end if end mouseWithin |



On 28.10.19 23:03, Klaus major-k via use-livecode 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
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
Hi Richmond,

> Am 28.10.2019 um 22:19 schrieb Richmond via use-livecode <[hidden email]>:
>
> |local fldState on mouseEnter if fld "fff" is empty then put "0" into fldState end mouseEnter on mouseWithin if fld "fff" is empty then -- do nothing else put "1" into fldState end if if fldState > 0 then set the textColor of fld "fff" to red end if end mouseWithin |

sorry, Bulgaria: Zero points 8-)
Definitvely NOT what I am after...

> On 28.10.19 23:03, Klaus major-k via use-livecode 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?
--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
Hi Hermann,

> Am 28.10.2019 um 22:15 schrieb hh via use-livecode <[hidden email]>:
>
> on dragDrop
>  if "files" is among the keys of the dragData then
>    put line 1 of the dragData["files"] -- or whatever
>  end if
> end dragDrop
>
> on dragEnter
>  set the dragAction to "copy"
> end dragenter

thank you, also tried that, but then the pathname does not appear in the field.

I want to:
Drag'n'Drop a file into the field -> works without scripting
The pathname appears in the field and is definitively selected!

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

I want to get that pathname from inside of the field = AFTER the file has been dropped.


Best

Klaus
--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
On 10/28/2019 5:25 PM, Klaus major-k via use-livecode wrote:

> Hi Hermann,
>
>> Am 28.10.2019 um 22:15 schrieb hh via use-livecode <[hidden email]>:
>>
>> on dragDrop
>>   if "files" is among the keys of the dragData then
>>     put line 1 of the dragData["files"] -- or whatever
>>   end if
>> end dragDrop
>>
>> on dragEnter
>>   set the dragAction to "copy"
>> end dragenter
> thank you, also tried that, but then the pathname does not appear in the field.
>
> I want to:
> Drag'n'Drop a file into the field -> works without scripting
> The pathname appears in the field and is definitively selected!
>
> 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
>
> I want to get that pathname from inside of the field = AFTER the file has been dropped.
>
>

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.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
Hi Paul.

> Am 28.10.2019 um 22:34 schrieb Paul Dupuis via use-livecode <[hidden email]>:
> ...
>>
>>> on dragDrop
>>>  if "files" is among the keys of the dragData then
>>>    put line 1 of the dragData["files"] -- or whatever
>>>  end if
>>> end dragDrop
>>>
>>> on dragEnter
>>>  set the dragAction to "copy"
>>> end dragenter
>> thank you, also tried that, but then the pathname does not appear in the field.
>>
>> I want to:
>> Drag'n'Drop a file into the field -> works without scripting
>> The pathname appears in the field and is definitively selected!
>>
>> 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
>>
>> I want to get that pathname from inside of the field = AFTER the file has been dropped.
> 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?


Best

Klaus
--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
On 10/28/2019 5:40 PM, Klaus major-k via use-livecode wrote:

> Hi Paul.
>
>> Am 28.10.2019 um 22:34 schrieb Paul Dupuis via use-livecode <[hidden email]>:
>> ...
>>>> on dragDrop
>>>>   if "files" is among the keys of the dragData then
>>>>     put line 1 of the dragData["files"] -- or whatever
>>>>   end if
>>>> end dragDrop
>>>>
>>>> on dragEnter
>>>>   set the dragAction to "copy"
>>>> end dragenter
>>> thank you, also tried that, but then the pathname does not appear in the field.
>>>
>>> I want to:
>>> Drag'n'Drop a file into the field -> works without scripting
>>> The pathname appears in the field and is definitively selected!
>>>
>>> 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
>>>
>>> I want to get that pathname from inside of the field = AFTER the file has been dropped.
>> 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.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
Hi Paul,

> Am 28.10.2019 um 22:47 schrieb Paul Dupuis via use-livecode <[hidden email]>:
>
> 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
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
on dragDrop doesn't trigger?

on dragDrop
  put the dragData ["text"] into tDragText
end dragDrop

Bob S


> On Oct 28, 2019, at 14:03 , Klaus major-k via use-livecode <[hidden email]> 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
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
If the field is locked you may have to set the dragActio to Copy on mouseEnter

Bob S


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
Hi Klaus.

>> I wrote:
>> on dragDrop
>>   if "files" is among the keys of the dragData then
>>     put line 1 of the dragData["files"] -- or whatever
>>   end if
>> end dragDrop
>>
>> on dragEnter
>>   set the dragAction to "copy"
>> end dragenter

> You wrote:
> .. also tried that, but then the pathname does not appear in the field.
> I want to:
> Drag'n'Drop a file into the field -> works without scripting
> The pathname appears in the field and is definitively selected!

Three remarks.

1. the filename ends up in the message box if you dont use the "whatever" ;-)
2. textchanged is also a script ;-)
3. Your method doesn't work for locked fields, the following does:

on dragDrop
  if "files" is among the keys of the dragData then
    put line 1 of the dragData["files"] into fn
    focus on me; put the selectedChunk into sc
    put fn into the selection
    if sc is not empty then select char (word 2 of sc) to \
          (word 2 of sc +len(fn)-1) of me
  end if
end dragDrop

on dragEnter
  set the dragAction to "copy"
end dragenter


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
Hi Hermann,

> Am 29.10.2019 um 00:55 schrieb hh via use-livecode <[hidden email]>:
>
> Hi Klaus.
>
>>> I wrote:
>>> on dragDrop
>>>  if "files" is among the keys of the dragData then
>>>    put line 1 of the dragData["files"] -- or whatever
>>>  end if
>>> end dragDrop
>>>
>>> on dragEnter
>>>  set the dragAction to "copy"
>>> end dragenter
>
>> You wrote:
>> .. also tried that, but then the pathname does not appear in the field.
>> I want to:
>> Drag'n'Drop a file into the field -> works without scripting
>> The pathname appears in the field and is definitively selected!
>
> Three remarks.
> 1. the filename ends up in the message box if you dont use the "whatever" ;-)

I guessed! 8-)

> 2. textchanged is also a script ;-)

Yep, I meant without any "dragxxx" script.
CoughnitpickerCough... ;-)

> 3. Your method doesn't work for locked fields, the following does:
> on dragDrop
>  if "files" is among the keys of the dragData then
>    put line 1 of the dragData["files"] into fn
>    focus on me; put the selectedChunk into sc
>    put fn into the selection
>    if sc is not empty then select char (word 2 of sc) to \
>          (word 2 of sc +len(fn)-1) of me
>  end if
> end dragDrop
>
> on dragEnter
>  set the dragAction to "copy"
> end dragenter

Thanks, but my field is unlocked.

I reported the problem that "selectionchanged" does not get triggered:
<https://quality.livecode.com/show_bug.cgi?id=22433>


Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
> Klaus M. wrote:
> Yep, I meant without any "dragxxx" script.

Why do you fear "dragxxx"?  ;-)

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
Hallo Hermann,

> Am 29.10.2019 um 13:32 schrieb hh via use-livecode <[hidden email]>:
>
>> Klaus M. wrote:
>> Yep, I meant without any "dragxxx" script.
> Why do you fear "dragxxx"?  ;-)

I really don't!

But if it works out-of-the box without any dragXXX scripting,
I highly welcome this, lazy moi. :-)


Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
>> I wrote:  Why do you fear "dragxxx"? ;-)
> You wrote: I really don't!

I really know. Was a 'language' joke, sorry.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
Hi Hermann,

> Am 29.10.2019 um 13:41 schrieb hh via use-livecode <[hidden email]>:
>
>>> I wrote:  Why do you fear "dragxxx"? ;-)
>> You wrote: I really don't!
>
> I really know. Was a 'language' joke, sorry.

AHA! Now I get it (I think)! 8-)

Well my first professional job as a musician (bass player) was at "Circus Roncalli"
in 1986, where I spent several months, so anything DRAGxxx related is not new to me
nor something I am afraid of at all, if you know what I mean. :-)


Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
In reply to this post by Ralph DiMola via use-livecode
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 <[hidden email]>, 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
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: drag'n'drop in text fields

Ralph DiMola via use-livecode
Hi Brian,

> Am 29.10.2019 um 14:47 schrieb Brian Milby via use-livecode <[hidden email]>:
>
> 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.

yes, maybe, at least this (docs or bug) needs to get fixed. :-)

> Thanks,
> Brian

Best

Klaus

--
Klaus Major
https://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
12