Not all properties available in expression binding for a button?

Using Ignition 7.9.9.

Have a button inside a container that I just set some role security on. I wanted to make it so that if the button was disabled, I would have some mouseover text explaining such to the user.

However, it seems like I am not able to access all the properties of the button in my Mouseover Text expression binding. Look here -

However, looking at the same button via a scripting window does show everything -

Trying to force this in the expression window by manually typing the property I am trying to bind to yields this -

It’s like this for all the buttons on my window (of which, I only have the first one have any security on) - in the expression binding very limited properties, in the scripting, they are all there.

What is going on?

This seems to be the case with all expression bindings in other windows as well. The tree also looks wrong - ie no long branch or short branches. image

I tried opening up the designer on another computer (not the VM I’m running it in) to no avail. I’m logging into the designer with the default ignition admin/password, but the project itself uses a AD-Internal hybrid, not sure if that could be causing anything.

I just reinstalled a completely fresh copy of Ignition 7.9.9, made a database and Active Directory user connection, started a brand new project, and have the same issue. Is binding to certain properties of components taken out in this version ie the componentEnabled/enabled property? I don’t know what else could be causing this. Any advice would be greatly appreciated.

The enable property, as far as I can recall, was never one you could access from an expression.

You can monitor for the vision-disabled-permissions event in a propertyChanged script:

if event.propertyName == 'vision-disabled-permissions':
	event.source.toolTipText = 'You do not have permission for this operation'
1 Like

Expressions can only bind to properties that conform to the Java “bean” requirements, and fire a property change on the backend. For various reasons, that rules out a bunch of properties on buttons and other components.

https://docs.oracle.com/javase/tutorial/uiswing/events/propertychangelistener.html

Using a completely fresh copy of Ignition 7.9.9. Just testing to see if I could bind a buttons mouse over text to an if statement on whether or not the button is enabled. However, the enabled property is not there

Was binding to certain component properties done away with in a previous version? Or is something deeply wrong with my copy of Ignition?

I noticed this property was missing as well. It’d be super useful to have available! Not sure if it was available before. If I’ve needed it in the past, I’ve just used the property event change script to write it to a custom property

1 Like

Could you just do the if with whatever binding you are using to disable it and set the text with that?

if({TagPath/TagToEnableButon},'ENABLED MOUSE OVER','DISABLED MOUSE OVER')

1 Like

It’s being disabled through security. It’s why I had suggested monitoring the vision-disabled-permissions event.

1 Like

Ahh then he can just bind the mouse over text to the hasRole expression.


if(hasRole('AllowedRoleName',{[System]Client/User/Username}),'Mouse over allowed','Mouse over when disabled')
1 Like

Wow I thought for sure I had used it before in my 7.9.1 project but looking to that, I don’t see it available either. Having a real Bernstein’s bears moment. Thank you all for the suggestions though I can definitely use them. Appreciate the help.

I’m having some issues using

if event.propertyName == 'vision-disabled-permissions':
	print "Updating to permissions message"
	event.source.toolTipText = 'Insuffecient permissions'

For some reason, it switches from None to ASO to The correct message BACK to ASO, according to my logs.

changing button prop
propName: componentRunning
old: False
new: True
changing button prop
propName: text
old: None
new: 
changing button prop
propName: vision-disabled-permissions
old: None
new: True
Updating to permissions message
changing button prop
propName: enabled
old: True
new: False
changing button prop
propName: disabledIcon
old: None
new: sun.swing.ImageIconUIResource@31579211
changing button prop
propName: ToolTipText
old: ASO
new: Insuffecient permissions
changing button prop
propName: ToolTipText
old: Insuffecient permissions
new: ASO

I don’t have anything actually bound to the Mousover Text field, I do have a default value of “ASO”, figuring that if it’s enabled, nothing will change and it will stay ASO, and if they are disabled via security then the message will change. I don’t understand how it’s changing back. Have you run into this?

Even more bizzare now, I’ve removed all property changes, removed the string constant from the Mouseovertext, and still somehow it finds a way to say “ASO” on mouseover.

The script that I had posted was the only one in the propertyChange script while I was testing. :confused:

It’s ok, it ended up working. I forgot I had another mouseOnEntered script running from before when I tried to fix it that was screwing things up.

1 Like

Been there, my friend, been there.

1 Like