Page 1 of 1
Starting drag operation with a widget
Posted: Thu Mar 17, 2016 8:12 pm
by trevordevore
Hi,
Should it be possible to start a drag operation when clicking on a widget? I haven't been successful in the past and I wonder if anything has changed or if perhaps I was doing something wrong.
Re: Starting drag operation with a widget
Posted: Mon Mar 21, 2016 4:51 pm
by peter-b
I think at the moment you have to start it from the widget's LiveCode Script rather than being able to start it directly from LCB.
Re: Starting drag operation with a widget
Posted: Mon Mar 21, 2016 8:21 pm
by trevordevore
I'm trying to start it from LCS. That is what doesn't work.
Re: Starting drag operation with a widget
Posted: Mon Mar 21, 2016 8:43 pm
by peter-b
trevordevore wrote:I'm trying to start it from LCS. That is what doesn't work.
Hmm, that's really weird -- I swear that's how dragging widgets out from the Tools palette works (dragging on an SVG Path widget initiates the drag operation).
Re: Starting drag operation with a widget
Posted: Mon Mar 21, 2016 8:47 pm
by trevordevore
Okay. I'll do some more tests and try again.
Re: Starting drag operation with a widget
Posted: Mon Mar 21, 2016 9:15 pm
by trevordevore
I just tried this test:
1) Drag SVG icon widget onto new stack.
2) Add this script to the widget:
Code: Select all
on dragStart
put the milliseconds
end dragStart
3) Click and drags on the widget. The milliseconds doesn't display in the message box.
The same script on a button control displays the milliseconds. I'm guessing the tools palette is using a different technique.
Re: Starting drag operation with a widget
Posted: Wed Mar 23, 2016 5:08 pm
by LCMark
The tools palette uses its own drag-drop (modal) loop to do its thing. This sounds like a bug in the widget host - it should still allow drag-drop stuff to be managed from script, even if widget's can't yet do so themselves.
Re: Starting drag operation with a widget
Posted: Wed Mar 23, 2016 5:08 pm
by peter-b
Probably best to file a bug report about this.
Re: Starting drag operation with a widget
Posted: Wed Mar 23, 2016 5:19 pm
by LCMark
Re: Starting drag operation with a widget
Posted: Wed Mar 23, 2016 5:25 pm
by trevordevore
Thanks guys.
Re: Starting drag operation with a widget
Posted: Wed Mar 23, 2016 5:31 pm
by LCMark
Re: Starting drag operation with a widget
Posted: Thu Mar 24, 2016 3:30 am
by pthirkell
This seems to relate also to bug
http://quality.livecode.com/show_bug.cgi?id=16930 reported in mid Feb. Glad to see quick fix thanks.
