Drag and Drop in Datagrid not working anymore in livecode 8

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dbcbos
Posts: 23
Joined: Sun Jun 24, 2012 9:49 am

Drag and Drop in Datagrid not working anymore in livecode 8

Post by dbcbos » Mon Oct 16, 2017 10:44 am

I have included a stack that works in reordering the data in a datagrid in livecode 7.1.4 and 8.0.2

And stopped working in Livecode 8 (tested on 8.1.2, 8.1.5 and 8.1.6) The drag line appears and stops and nothing happens.

Anyone know what I missed since the version change?

Or is this a bug?
Attachments
testdragdropdatagrid.zip
(4.82 KiB) Downloaded 223 times

Klaus
Posts: 13823
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Drag and Drop in Datagrid not working anymore in livecode 8

Post by Klaus » Mon Oct 16, 2017 12:22 pm

Hi dbcbos,

looks like you used the drag script from the "DataGrid Helper" plug-in, right?
But you omitted another handler neccessary for that script!
Add this and it works as advertized!:

Code: Select all

...
on dragMove
   if (line 1 of the dragData["private"] is "DGH_ReorderLines") then 
       ## Acceptance only of a row
      set the dragaction to "copy"
   end if
end dragMove
Tested and works!


Best

Klaus

dbcbos
Posts: 23
Joined: Sun Jun 24, 2012 9:49 am

Re: Drag and Drop in Datagrid not working anymore in livecode 8

Post by dbcbos » Mon Oct 16, 2017 12:59 pm

Ah thanx Klaus that helped! It was a long time ago I probably used it yes, always worked just suddenly when I went to 8.1 no more. Thank you for your help

bhall2001
Posts: 107
Joined: Thu Oct 30, 2014 3:54 pm
Location: Manchester, NH

Re: Drag and Drop in Datagrid not working anymore in livecode 8

Post by bhall2001 » Sun Nov 05, 2017 3:04 am

I'm still having this problem with the datagrid. To my knowledge I've never used the Datagrid helper but have code similar to what is posted in this thread in a couple of apps to reorder datagrid content. This functionality stops working for me starting at 8.1.5 (8.1.4 works like a charm) on my Mac OS X v10.13 system.

Using the test stack provided (with the suggested fix), I am not able to get the drag drop working. On my system, works great in 8.1.4 but starting with 8.1.5, the dragReorderDrop handle is not called. This results in the drop insert group becoming visible and staying visible going forward.

I'd like to see if any can re-confirm that in 8.1.7 you do or do not receive the dragReorderDrop message. I do not and my drag, reorder, drop on my datagrids is not working.

Thanks in advance,

Bob

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”