Log in

View Full Version : Callback multiple button objects


Pegasus3
08-25-2022, 02:12 PM
Hi all,

I am designing an interface with multiple buttons as shown in screenshot named buttons. I want to run all as per the user need and I wrote following code (please see snapshot named code)
1001

1002
But the issue is only the function which I defines at the last works and others not work for callback. Can someone help me out in this issue.

Jeff
08-30-2022, 09:49 PM
Try registering the callback functions for button presses using vizact.onbuttondown:

vizact.onbuttondown(exitButton, onExitButton)
vizact.onbuttondown(pauseButton, onPauseButton)
vizact.onbuttondown(resumeButton, onResumeButton)

Pegasus3
08-31-2022, 10:30 AM
Yes I tried but got another error (PFA screenshot)