[FEATURE-6423] 'Confirm?' prop for the Perspective Multi-State Button

In ignito perspective there is no ‘are you sure’ popup as there is on the one shot button? Is there something I am missing or do you have to create your own pop up? It was available on ignition vision

Hi Philip,

I wrote up a ticket for us to take a look at adding this functionality to the Perspective version of the Multi-State Button. Seeing as similar components across Vision and Perspective have this property to enable a confirmation popup, it appears to be an oversight on our part. We will update this thread if and when that feature makes it into an Ignition release.

Oy! I hope not. Confirmation popups are an anti-pattern. See this recent discussion (among many):

1 Like

Can you give an example of a "Command Mode" control or something similar on what you are referring to?

I like the though process around having things to be more intuitive and a smoother flow, but what if we have an emergency button that would stop the process fully, and wanted to protect it from accidently being pressed. A confirmation box is an obvious thing we think of to put in place.

Is a command mode control a component (button, switch, etc..) that enables the emergency stop button, so you are doing two clicks anyways?

An emergency stop probably doesn't belong in software.

Yes. One click to enable the "protected" operation(s), then the second click to execute. The latter can also cancel the "command mode" before the timeout expires.

The point is that a popup, if modal, doesn't let anything else happen until dismissed, even things that might also be important to have available in a single click. In Vision, the common GUI popups stop all foreground scripting, too.

Note that things like emergency stops are forbidden to require multiple actions, if you can have it on an HMI at all.

Yes you are right, bad example, shouldn't have said the word "emergency" to something that is critical to the safety of others.

To my above question, a more practical case of something that may need someone to not accidently press something in general.

1 Like

Have a command mode button that toggles a custom property bool. Then in your scripts that should only work in command mode, check the custom prop bool to make sure it is true. Otherwise, you are in "read-only" mode.

def runAction(self, event):
	if self.view.custom.commandMode:
		# do writes
	else:
		# in read-only mode
		return

By itself, this provides insufficient user feedback. Enabling & disabling the "protected" buttons provides a clear indication that a something is not going to respond.

1 Like

Yep, that makes more sense, use the property in an expression to enable/disable the protected buttons :+1: