What is the difference between clicking and "send mouseup"
gcanyon at inspiredlogic.com
Sun Jan 6 14:56:01 CST 2002
At 11:08 AM -0500 1/6/02, Victor Eijkhout wrote:
>What is the difference between clicking ona button with a "mouseup" handler, and typing <send "mouseup" to button "a"> in the message box, the latter divided up in cases where the hand and the pointer tool are enabled?
>Here's the behaviour that I see:
>message box, pointer tool enabled: nothing happens
>message box, hand tool enabled: error message
>Script compile error:
>clicking on the button: it works, or sometimes rev crashes
>I have no idea even where to start analysing this situation.
As far as I know there shouldn't be any in the context you're describing. If you have two stacks open and the one with the button isn't in front (and you send "mouseUp" to it specifying the stack as well) then there might be a difference because references to controls, etc., won't resolve properly.
Can you post the mouseUp handler from the button?
In general (donning fire-protective clothing here) you shouldn't do either of these.
If you have a behavior you want a button to trigger, but that you also want to be able to get in another way, then you should have something like this in the mouseUp of the button:
And then if you want to get that behavior elsewhere, you just need to:
You have to watch for the context, though, to be sure any references to controls, etc, resolve the way you think they will.
More information about the use-livecode