Workaround for WebSegmentedControl Bug

What is the workaround for the WebSegmentedControl Action event firing multiple times instead of just one?

<https://xojo.com/issue/31344>

This is a new bug that was introduced with Xojo 2013 Release 4.1. Without a workaround, we need to abandon the WebSegmentedControl or fallback to 2013r3.3 and miss out on all the fixes and new features in 2013r4.1. A proven workaround would be great. Having the bug fixed would be even better.

I did some tests using a timer so it wouldn’t respond to the subsequent events until it had timed out. It seemed to work well until the user switched segments very quickly. Ultimately I went down a different path but I think you could use that approach along with the mousedown events to cancel the timer.

Another approach would be to create your own WebSegmentedControl using a WebContainer control along with WebImage controls with Styles to mimic the Segmented controls. I’d have to think about the details a bit more, but if I were in a bind that’s what I would do.

[quote=60436:@Bob Keeney]I did some tests using a timer so it wouldn’t respond to the subsequent events until it had timed out. It seemed to work well until the user switched segments very quickly. Ultimately I went down a different path but I think you could use that approach along with the mousedown events to cancel the timer.

Another approach would be to create your own WebSegmentedControl using a WebContainer control along with WebImage controls with Styles to mimic the Segmented controls. I’d have to think about the details a bit more, but if I were in a bind that’s what I would do.[/quote]
Unfortunately, the Timer approach makes the WebSegmentedControl feel sluggish. If this bug doesn’t get fixed for 2014r1, we’ll go with building our own custom control. Thanks Bob!

Good news . . . Greg just fixed it.

<https://xojo.com/issue/31344>

Thanks Greg!