Button does not receive mouseUP after disabling then enabling button

Mike Bonner bonnmike at gmail.com
Sat Aug 15 22:09:50 CEST 2015

Cant duplicate it (on 6.7.4,don't have 6.7.3) windows 10. Its working as
expected for me.

On Sat, Aug 15, 2015 at 1:45 PM, Martin Koob <mkoob at rogers.com> wrote:

> I have a button that when the user clicks it it needs to be disabled till a
> process that the mouseUp started is done then it is re-enabled once the
> process is done and the user should be able to click it again.
> The problem I am encountering is that once the button is re-enabled if the
> mouse has not moved within the button after the mouse was re-enabled the
> mouseUp is not received by the button script.
> If you move the mouse before clicking then the button script will receive
> the mouseUp.
> If you click the button without moving after it was reenabled then click
> again the mouseUp from the second click will be received.
> You can replicate this by following these steps.
> 1. put the following script in a button.
> on mouseUp
>       setState "off"
>       send "setState on" to me in 3 seconds
> end mouseUp
> on setState pState
>    lock screen
>    if pState is "on" then
>       enable me
>       set the name of me to "on"
>    else
>       disable me
>       set the name of me to "off"
>    end if
>    unlock screen
> end setState
> 2. click the button but don't move the mouse pointer after that. (not
> moving
> pointer works best with clicking on trackpad)
> ->the button will be disabled then enabled in 3 seconds.
> 3. click the button a second time
> ->nothing happens.
> 4. click the button a third time
> ->the mouseUp is received this time
> If in step 2 you move the mouse within the button after it is enabled
> before
> clicking it the mouseUp will be received.
> It seems by disabling and reenabling the mouseButton LC loses track of
> where
> the mouse pointer is so the button does not receive the click.   Is there a
> way to remind the button that the mouse is over it without physically
> moving
> the mouse?   I tried locking the screen or sending mouseMove messages to
> the
> button once it is enabled but that does not  work.
> Is this a known issue?  Should I post a bug report?  I am using LC 6.7.3.
> Martin Koob
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Button-does-not-receive-mouseUP-after-disabling-then-enabling-button-tp4695119.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

More information about the use-livecode mailing list