Hi Hermann, > Am 29.10.2019 um 00:55 schrieb hh via use-livecode > <use-livecode@lists.runrev.com>: > > 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 kl...@major-k.de _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode