problem with drag-dropping a text string

Peter Brigham pmbrig at
Sat Apr 12 09:17:38 CDT 2008

On Apr 11, 2008, Eric Chatonet <eric.chatonet at>  

> Hi Peter,
> I just made the experiment by selecting a chunk of text in an
> unlocked field and setting the dragData["text"] to a different value
> in a dragStart handler.
> When dropping it in Rev or in another application the result was the
> one I expected, i.e. the text I had set by script.
> Difficult to tell you what you probably miss without having more
> details ;-)

Thanks for trying it out, Eric. So -- I made a new stack, no scripts  
at all. Two fields, "f1" and "f2" -- in f1 is the text "something  
here". The script of f1 consists only of a dragLeave handler:

on dragLeave
   set the allowableDragActions to "copy"
   set the dragAction to "copy"
   -- if I take the above two lines out then text is moved
   -- instead of copied but still is not modified
   put the dragData["text"] into dd
   put " modified" after dd
   set the dragData["text"] to dd
   put the dragData["text"] into ddMod
   -- breakpoint
   pass dragLeave
end dragLeave

I select "something here" in f1 and drag to f2. I should get  
"something here modified" dropped into f2, but I get "something  
here". With the breakpoint, in the debugger I get dd = ddMod =  
"something here". Setting the dragData is ignored.

Mac iBook G4, OSX 10.4.1, Studio 2.9 build 610

This is a bug, at least on my system, no? Unless there is something  
in my settings I've overlooked... I'n not running Galaxy or any other  
alternative IDE software. I see no similar bugs reported so far in  
the QCC.

And, BTW, in a *dragstart* handler, (1) setting the dragAction (and/ 
or allowableDragActions) doesn't work for me, and (2) the dragData  
property returns empty -- is that normal? Seems odd. In the above  
dragLeave handler both these things work as expected. If this is  
abnormal behavior, is it somehow connected with my inability to set  
the dragData at any point?


Peter M. Brigham
pmbrig at

More information about the use-livecode mailing list