how can I stop a mouseenter-command
Alex Tweedly
alex at tweedly.net
Fri Nov 13 18:30:50 EST 2009
DunbarX at aol.com wrote:
> The variable issue suggested by Jan is likely your problem. But do you
> think this is nicer?
>
> on mouseEnter
> wait 1 second
> if the mouseLoc is within the rect of me then doYourStuff
> end mouseEnter
>
But beware that this will wrongly fire if you pass the mouse through a
button, i.e. enter the button, leave it and re-enter it before one
second later.
Of course, the wait with messages using a simple boolean value such as
tMouseOut has similar, though more subtle, failure modes; e.g. if you
enter, then leave and then re-enter the button within the one second
interval of the "wait with messages".
I was going to suggest an alternative (keeping track of "the millisecs")
but when I tested it, I found that I did not reliably get the
'mouseleave' messages if I enter + leave + enter within a short time
period. (This was detectable using both my on code and using the message
watcher). So I'd recommend first testing that you do get these messages
reliably (maybe it's just me), and/or checking in the bug database to
see if there's any known problem with these messages.
-- alex.
More information about the use-livecode
mailing list