10-23-2020 04:19 AM
Hi
I used a "mouse down" as under "value change" the false > true action is a trigger and the return True > false is a stored trigger for the event structure and triggers straight away again on the next loop of the software. I was therefore ONLY looking for the downward press but as you can see that didn't work to good either lol
10-23-2020 06:45 AM
@NToombes wrote:
Hi
I used a "mouse down" as under "value change" the false > true action is a trigger and the return True > false is a stored trigger for the event structure and triggers straight away again on the next loop of the software. I was therefore ONLY looking for the downward press but as you can see that didn't work to good either lol
This is only true for switching mechanical actions. If you use Latch when Pressed or Latch when Released mechanical action this will not be an issue.
10-23-2020 09:40 AM
@NToombes wrote:
Hi
I used a "mouse down" as under "value change" the false > true action is a trigger and the return True > false is a stored trigger for the event structure and triggers straight away again on the next loop of the software. I was therefore ONLY looking for the downward press but as you can see that didn't work to good either lol
Do you have your buttons set to "Latch Until Released" something? Otherwise, where does this "return True > false" event come from? That doesn't happen with standard buttons.
11-05-2020 07:54 AM
Hi all
OK, I have thrown the towel in on this one for now and but the start button in a simple while loop that executes 20 times a second with a button press stopping the loop. Horrific I know but it works!
Seems to complex to just instigate some cod that awaits a button press before continuing. I tried some of the other options listed before this post and yes, they worked but then my other buttons stopped responding etc & the Start button seemed to hold in the "on" state, not what I wanted.
I need to spend some more time on these event structures, not as simple as they look on the surface.
Neil
11-05-2020 10:55 AM
You might want to show some code. I suspect you have some significant design problems. Your non-responding buttons sounds like you are trying to do UI work inside an Event Case that is locking the UI while it executes. You can easily turn that lock off, but you'd be better off fixing your design issues.
11-06-2020 09:08 AM
@drjdpowell wrote:
You might want to show some code. I suspect you have some significant design problems. Your non-responding buttons sounds like you are trying to do UI work inside an Event Case that is locking the UI while it executes. You can easily turn that lock off, but you'd be better off fixing your design issues.
I agree with this. It seems like you are way overcomplicating this.
11-06-2020 09:32 AM
From the description I see two simple solutions.
1. Disable the button as the event activates.
2. Use Lock event structure if it's happening during the button event
Both will prevent accidental presses.
A slightly more advanced solution is to register the button value changed as a dynamic event and (un)register as needed, but that seems overly complicated. 🙂