Button does not receive mouseUP after disabling then enabling button
Peter TB Brett
peter.brett at livecode.com
Sun Aug 16 03:27:59 EDT 2015
On 2015-08-15 22:53, Martin Koob wrote:
> Hi
>
> I found another way to resolve it that works in the sample stack and in
> my
> application. Reading about the wait command in the dictionary I saw
> you can
> also use send in time to give LiveCode a chance to process messages.
>
> If I use send in time for both "setState off" and "setState on" then I
> can
> click the button when it is re-enabled.
>
> Here is the workaround script for the sample button.
>
> on mouseUp
> send "setState off" to me in 10 milliseconds
> send "setState on" to me in 3 seconds
> end mouseUp
You can actually also do:
send "setState off" to me in 0 seconds
The engine will finish mouseUp, process messages, and then immediately
run "setState off".
Peter
--
Dr Peter Brett <peter.brett at livecode.com>
LiveCode Engine Development Team
More information about the use-livecode
mailing list