disabled buttons still receive events, they just process them, later?

Mike Kerner MikeKerner at roadrunner.com
Wed Feb 21 16:58:30 EST 2024


i did.
i have both a button, and a power button.
script:

*local* count

*on* mouseUp

*if* the disabled of me *then* *put* cr & "disabled" after msg

*add* 1 to count

*set* the enabled of me to false

*put* count

*wait* 2 second

*set* the enabled of me to true

*end* mouseUp

On Wed, Feb 21, 2024 at 4:47 PM Craig Newman via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Mike.
>
> In a new stack I placed a button with this:
>
> on mouseUp
>   beep 2
> end mouseUp
>
> If I click on the button I hear two clicks. I disabled the button and
> clicked on it. I enabled the button. No clicks. I did this all by hand. Did
> you?
>
> Craig
>
> > On Feb 21, 2024, at 4:07 PM, Mike Kerner via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> >
> > alright, i'm a little surprised to notice this:
> > i have a button. i disabled the button.
> > then i clicked on the button
> > then i re-enabled the button
> > the click, from the period while the button was disabled, is received and
> > processed by the button.
> > that seems problematic, to me. how would one cause clicks to be
> discarded,
> > permanently? hide the button? overlay it with a transparent control that
> > will absorb and ignore the clicks?
> >
> > --
> > On the first day, God created the heavens and the Earth
> > On the second day, God created the oceans.
> > On the third day, God put the animals on hold for a few hours,
> >   and did a little diving.
> > And God said, "This is good."
> > _______________________________________________
> > 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
>
>
> _______________________________________________
> 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
>


-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."


More information about the use-livecode mailing list