Need help with "disabling" a button!

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10309
Joined: Wed May 06, 2009 2:28 pm

Re: Need help with "disabling" a button!

Post by dunbarx » Wed Jan 11, 2017 5:55 pm

Submitted bug 19087.

We will se what their opinion is of all this.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10309
Joined: Wed May 06, 2009 2:28 pm

Re: Need help with "disabling" a button!

Post by dunbarx » Wed Jan 11, 2017 7:48 pm

So I hid the button, clicked on the empty space, but did NOT show the button at handler's end. No events. Aha. No coordinates or targets.

And then Mark W. replied:
Hi Craig,

This isn't a bug - but a side effect of using 'wait'.

When wait is called (without messages), all UI events are queued and processed
at the next event handling point - which won't be until after the mouseUp has
finished.

Since the button is visible at the point the event is processed, the click
works.

Basically, if you use 'wait' then you must also use 'flushEvents' afterwards if
you *don't* want any events accumulated during the 'wait'.

Warmest Regards,

Mark.
I see that this was what Jacque said early on. Typical.

Craig

Post Reply