Reliable script to handle selection/drag-and-drop in a list field?

Peter Haworth pete at lcsql.com
Fri Jul 26 20:23:47 EDT 2013


Hi Geoff,
I got a few minutes to check this out and everything works fine now except
for the issue of dragging above/below the field.  However, looks like
that's just a matter of how much of a border you allow for when calculating
the noFlyRect.  I changed the top and bottom borders from 20 to 10 and that
fixed the issue.

Thanks again for this, been trying to figure out how to do it for ages!

Pete
lcSQL Software <http://www.lcsql.com>


On Fri, Jul 26, 2013 at 1:22 AM, Geoff Canyon <gcanyon at gmail.com> wrote:

> Thanks to Peter for pointing out some issues. Update to fix them:
>
> https://docs.google.com/file/d/0By_mW8YYOZpAZ19VUHdHcjViY28
>
>
> On Wed, Jul 24, 2013 at 3:38 AM, Geoff Canyon <gcanyon at gmail.com> wrote:
>
> > Thanks for pointing out the new messages for behaviors. This version<
> https://docs.google.com/file/d/0By_mW8YYOZpAOTE2blU1Y2JhMnM/>should
> address the following:
> >
> >  -- All messages should be "before" or "after" so they won't interfere
> > with your code.
> >  -- Clicking on the selection should not change the selection --
> > previously if you clicked an item that was one of multiple highlighted
> > lines, the others would all be deselected, but then jump back if you
> > dragged. Now the selection remains, ready to be dragged.
> >  -- The image of the dragged items in most cases will be positioned as
> you
> > drag so that the spot you clicked -- whatever item that was -- should be
> > directly under the pointer where it was when you clicked to drag. This
> > doesn't do what I want when the dragged lines are more than will fit in
> the
> > visible list at one time. I'm still working on that.
> >
> > Let me know what else you find.
> >
> > gc
> >
> >
> > On Tue, Jul 23, 2013 at 5:17 PM, Geoff Canyon <gcanyon at gmail.com> wrote:
> >
> >> On Tue, Jul 23, 2013 at 1:02 PM, Richard Gaskin <
> >> ambassador at fourthworld.com> wrote:
> >>
> >>> I wonder if Geoff's script could be revised to use "before mouseDown"
> or
> >>> "after mouseDown" to allow instances to handle the primary forms of
> those
> >>> messages without interference?
> >>>
> >>
> >>
> >> I checked, and the appropriate combination of before and after handlers
> >> works great. I want to adjust the positioning of the highlight a bit and
> >> then I'll post an update.
> >>
> >
> >
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list