Re: Levure Dataview Question

2019-04-01 Thread Trevor DeVore via use-livecode
On Fri, Mar 29, 2019 at 1:41 PM David Bovill via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Is there built in support for drag- reordering of rows?
>

There are some APIs for helping with drag reordering. They are not
currently documented though.

The following code will create a drag image from one of the rows and turn
on tracking so that a horizontal bar appears within the DataView where the
drop will occur.

```
on dragStart
  set the dvDragImageRow of me to item 1 of the dvHilitedRows of me
  set the dvTrackDragReorder[the dvHilitedRows of me] of me to true
  set the dragData["private"] to the dvHilitedRows of me # dragdata has to
be set to something.
end dragStart
```

The DataView will then send a `DragReorderRows` message when the drop
occurs. Since the DataView doesn't know anything about your data source it
is up to the developer to update the data source and refresh the view.

The `DragReorderRows` handler looks like this:

```
command DragReorderRows pRowsBeingDragged, pMoveToRow, pDroppedAfterRow
  put "pRowsBeingDragged:" && pRowsBeingDragged & cr & \
"pMoveToRow:" && pMoveToRow & cr & \
"pDroppedAfterRow:" && pDroppedAfterRow
end DragReorderRows
```

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Levure Dataview Question

2019-03-31 Thread Mike Kerner via use-livecode
You might want to open an issue at
https://github.com/trevordevore/levurehelper-dataview/issues

On Sat, Mar 30, 2019 at 7:24 AM David Bovill via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Yes would be good to know. I've seen demos of drag- reordering, and
> scripted a few experiments - but seeing that work on mobile for something
> as visually complex as a data grid (or Levure dataview) I've no seen.
>
> My suspicion is that that sort of visual drag drop animated feedback is
> best done in HTML. But with the steady progress in accelerated rendering
> and widgets perhaps it is possible to acheive the same level of quality
> using native Livecode. Would be good to see a demo
>
> On Fri, 29 Mar 2019 at 23:14, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > WHOOPS! Dataview. Sorry I thought Datagrid. It's late.
> >
> > Bob S
> >
> >
> > > On Mar 29, 2019, at 16:12 , Bob Sneidar via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >
> > > If there is I'd like to know. I created a couple arrows that sit to the
> > left of the datagrid. Any time you select a row, the grid sends a message
> > to the group and moves the arror group adjacent to it. Obviously,
> clicking
> > up or down relocates that row.
> > >
> > > You can just see why drag-drop reordering might not be useful.
> Datagrids
> > have a sort function, so it would have to be that if you drag-reorder
> > something, the sort for that datagrid would have to be turned off. That
> > would mean you would have to keep turning it back on when you repopulated
> > the grid.
> > >
> > > Bob S
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Levure Dataview Question

2019-03-30 Thread David Bovill via use-livecode
Yes would be good to know. I've seen demos of drag- reordering, and
scripted a few experiments - but seeing that work on mobile for something
as visually complex as a data grid (or Levure dataview) I've no seen.

My suspicion is that that sort of visual drag drop animated feedback is
best done in HTML. But with the steady progress in accelerated rendering
and widgets perhaps it is possible to acheive the same level of quality
using native Livecode. Would be good to see a demo

On Fri, 29 Mar 2019 at 23:14, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> WHOOPS! Dataview. Sorry I thought Datagrid. It's late.
>
> Bob S
>
>
> > On Mar 29, 2019, at 16:12 , Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > If there is I'd like to know. I created a couple arrows that sit to the
> left of the datagrid. Any time you select a row, the grid sends a message
> to the group and moves the arror group adjacent to it. Obviously, clicking
> up or down relocates that row.
> >
> > You can just see why drag-drop reordering might not be useful. Datagrids
> have a sort function, so it would have to be that if you drag-reorder
> something, the sort for that datagrid would have to be turned off. That
> would mean you would have to keep turning it back on when you repopulated
> the grid.
> >
> > Bob S
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Levure Dataview Question

2019-03-29 Thread Bob Sneidar via use-livecode
WHOOPS! Dataview. Sorry I thought Datagrid. It's late. 

Bob S


> On Mar 29, 2019, at 16:12 , Bob Sneidar via use-livecode 
>  wrote:
> 
> If there is I'd like to know. I created a couple arrows that sit to the left 
> of the datagrid. Any time you select a row, the grid sends a message to the 
> group and moves the arror group adjacent to it. Obviously, clicking up or 
> down relocates that row. 
> 
> You can just see why drag-drop reordering might not be useful. Datagrids have 
> a sort function, so it would have to be that if you drag-reorder something, 
> the sort for that datagrid would have to be turned off. That would mean you 
> would have to keep turning it back on when you repopulated the grid. 
> 
> Bob S


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Levure Dataview Question

2019-03-29 Thread Bob Sneidar via use-livecode
If there is I'd like to know. I created a couple arrows that sit to the left of 
the datagrid. Any time you select a row, the grid sends a message to the group 
and moves the arror group adjacent to it. Obviously, clicking up or down 
relocates that row. 

You can just see why drag-drop reordering might not be useful. Datagrids have a 
sort function, so it would have to be that if you drag-reorder something, the 
sort for that datagrid would have to be turned off. That would mean you would 
have to keep turning it back on when you repopulated the grid. 

Bob S


> On Mar 29, 2019, at 11:40 , David Bovill via use-livecode 
>  wrote:
> 
> Is there built in support for drag- reordering of rows?


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Levure Dataview Question

2019-03-29 Thread David Bovill via use-livecode
Is there built in support for drag- reordering of rows?
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode