Dragging from a list field
Trevor DeVore
lists at mangomultimedia.com
Sat Aug 27 23:27:45 EDT 2005
On Aug 27, 2005, at 8:14 PM, J. Landman Gay wrote:
> Phil Davis wrote:
> >
> > Instead of using Rev's drap/drop features, you could fake it with a
> > button that appears at the mouseLoc when the drag begins.
>
> Thanks Phil. I've seen this before and works well. In this case I
> have to drag between two stacks though, so a button won't work.
>
> Actually, I have the dragging part working, it is toggling between
> two states in the list field that has me stuck.
What I did in the same scenario was move the selectionChanged code to
mouseDown. I couldn't find another way around it. You have to set
dragData in mouseDown. mouseDown is sent before selectionChanged and
setting the dragData kills selectionChanged.
I'm not sure that this is directly related to setting the dragData
though. It seems there are other ways to kill selectionChanged in
mouseDown as well. For example:
on selectionChanged
answer "selectionChanged"
pass selectionChanged
end selectionChanged
on mouseDown
answer "mouseDown"
pass mouseDown
end mouseDown
In Rev 2.6 on OS X you will never see the answer dialog for
selectionChanged. If you remove the answer "mouseDown" code you
will. A repeat loop in a mouseDown event can kill selectionChanged.
See bug #2930.
So there are many ways to keep selectionChanged to keep from being
called.
--
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com
More information about the use-livecode
mailing list