How do I get the object under the mouse when mouseRelease?
Bill Marriott
wjm at wjm.org
Mon Apr 30 20:30:21 EDT 2007
Tiemo,
It's not quite impossible.
If you turn on the message watcher, you will see that when you
drag-and-release, the following messages are sent in quick succession:
- mouseRelease to the original object
- mouseMove to the new object
- mouseLeave to the original object
- mouseEnter to the new object
Because this order is always the same, you could check for this pattern and
respond to it.
> > > I want to realize my own drag and drop handlers with mouseDown,
> > > mouseRelease, etc. On mouseDown I get the underneath lying object with
> > > mousecontrol. How do I get the name of an object (image) under the
> > > mouse
> > > when releasing it [...]?
> > Sorry, Tiemo... for right now that's the best we've got (AFAIK). I've
> > lobbied for the mouseControl to not be tied to the original object on
> > mouseDown, but sadly that hasn't happened yet...
> Wow, that's a pitty, I was sure there must be a pretty easy solution, but
> if
> even Ken doesn't has it ;-(
More information about the use-livecode
mailing list