I hate mousedown

Lynch, Jonathan bnz2 at cdc.gov
Fri Apr 29 09:03:28 EDT 2005


Your're welcome!

The Drag stuff can get quite tricky. When the scripts are not set up
properly, it can cause your stack to freeze up, or to act as if there is
a script that keeps running and stopping in the background, causing
RunRev to act very sluggish.

For a button to receive a drapdrop, you need to have a script in the
button itself like this:

On Dragenter
  Set the acceptdrop to true
  Pass dragenter
End dragenter

This will allow the button to receive a dragdrop - I know this is
counter-intuitive.  You'd think that acceptdrop would be an object
property, so that you have a script that says

  Set the acceptdrop of button "my button" to true

But it is not set up that way, and that line causes an error.

Good luck,

Jonathan


-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Thomas
McGrath III
Sent: Thursday, April 28, 2005 6:08 PM
To: How to use Revolution
Subject: Re: I hate mousedown

Jonathan,

I did not know that at all. I haven't played with the drag stuff too 
many times. I am intrigued by it and am off to test some code.
It is sort of like faking the drag in order to make use of the other 
messages. Very cool.

Thank you very much,

Tom


On Apr 28, 2005, at 2:55 PM, Lynch, Jonathan wrote:

> If you put something into the dragdata, then yes, drag messages will 
> be sent.
>
> If what you want is for objects under a mouse to receive a message 
> when the mouse enters the screen area of that message, while the 
> mousebutton is currently being pressed, then that is the way to do it.
>
> Mouseenter does not work while the mouse button is down. Dragenter 
> works, but only if something is being dragged. So - on mousedown for a

> given button, you put something into the dragdata - then something is 
> being dragged and a dragenter message will be sent when the mouse 
> enters another object.

Thomas J. McGrath III
SCS
1000 Killarney Dr.
Pittsburgh, PA 15234
412-885-8541

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list