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

Geoff Canyon gcanyon at gmail.com
Fri Jul 26 04:22:54 EDT 2013


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



More information about the use-livecode mailing list