Starting drag operation with a widget

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Starting drag operation with a widget

Post by trevordevore » Thu Mar 17, 2016 8:12 pm

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.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: Starting drag operation with a widget

Post by peter-b » Mon Mar 21, 2016 4:51 pm

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.
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Starting drag operation with a widget

Post by trevordevore » Mon Mar 21, 2016 8:21 pm

I'm trying to start it from LCS. That is what doesn't work.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: Starting drag operation with a widget

Post by peter-b » Mon Mar 21, 2016 8:43 pm

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).
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Starting drag operation with a widget

Post by trevordevore » Mon Mar 21, 2016 8:47 pm

Okay. I'll do some more tests and try again.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Starting drag operation with a widget

Post by trevordevore » Mon Mar 21, 2016 9:15 pm

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.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1208
Joined: Thu Apr 11, 2013 11:27 am

Re: Starting drag operation with a widget

Post by LCMark » Wed Mar 23, 2016 5:08 pm

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.

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: Starting drag operation with a widget

Post by peter-b » Wed Mar 23, 2016 5:08 pm

Probably best to file a bug report about this.
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1208
Joined: Thu Apr 11, 2013 11:27 am

Re: Starting drag operation with a widget

Post by LCMark » Wed Mar 23, 2016 5:19 pm


trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Starting drag operation with a widget

Post by trevordevore » Wed Mar 23, 2016 5:25 pm

Thanks guys.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1208
Joined: Thu Apr 11, 2013 11:27 am

Re: Starting drag operation with a widget

Post by LCMark » Wed Mar 23, 2016 5:31 pm


pthirkell
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 93
Joined: Tue Nov 17, 2009 6:47 pm
Location: Wellington, New Zealand

Re: Starting drag operation with a widget

Post by pthirkell » Thu Mar 24, 2016 3:30 am

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. :D

Post Reply

Return to “LiveCode Builder”