Another way that might work. Is this safe, or are there cases where it will
restart the handler before "doSomething" completes?

on mouseUp
   disable me
   send "doSomething" to me -- should wait till "doSomething" finishes
   enable me
end mouseUp


command doSomething
   wait 3 seconds with messages -- waits till this completes even with
"messages"
end doSomething

On Sat, Aug 15, 2015 at 2:18 PM, Randy Hengst <iowahen...@mac.com> wrote:

> Martin,
>
> I’m using LC 6.7.5 on Mac OSX 10.2 and can duplicate your observations.
>
> A couple other things… if at your step 3 you use an command>option>click
> on the button (to see the script) it shows the script of the card.
>
> And if you change your button script to this… it works fine.
>
> on mouseUp
>    setState "off"
>    wait 3 seconds with messages
>    setState "on"
> end mouseUp
>
> be well,
> randy
>
> Randy Hengst
> www.classroomFocusedSoftware.com
>
>
> > On Aug 15, 2015, at 3:09 PM, Mike Bonner <bonnm...@gmail.com> wrote:
> >
> > 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 <mk...@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@lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to