Drag & Drop question

tkuypers at telenet.be tkuypers at telenet.be
Tue Jun 29 20:26:08 EDT 2010


ok, something weird is happening and I'm lost...

I have a list with some lines of text of which I want to drag from.
Next I have a button on which I want to drop onto.

I've created an invisible button, whose label is set to the line I selected, and becomes visible in the "dragStart" handler of the field.

Script in field:
on dragStart
   set the itemdel to tab
   set the label of btn "DragData" to item 2 of the hilitedText of me
   show btn "DragData"
   set the dragData["text"] to the hilitedText of me
   pass dragStart
end dragStart

on dragEnd
   hide btn "DragData"
end dragEnd

on dragMove
   set the loc of btn "DragData" to the mouseLoc
   pass dragMove
end dragMove


And now the strange thing.
Drag & drop works fine, the button accepts the drop, but moving the "text-lable-button" is choppy and  stops when I leave the field.

So I moved the "DragMove" handler out of the field and moved it to the card script.
Moving is really smooth now, the button follows the mouse very nice, but the drop doesn't work anymore... The button that should receive the dragData just doesn't react anymore.

What am I missing?

I'm on a Mac and using the latest version of RR (4.5.0-dp-3), but 4.0.0-gm-1 reacts the same.

Any help is welcome!


Met vriendelijke groeten,
Warm Regards,

PublishingTools 4 U
Ton Kuypers
+32 (0) 477 739 530

Aardbemden 11 • B-2400 • Mol • Belgium
www.publishingtools4u.com






More information about the use-livecode mailing list