How is this possible

Just wanted to add that on my little test bed here, the button script would run regardless of whether it was enabled or not (running 7.2.2). :open_mouth:

If I also turned off visibility, it would work okay, just not the enable by itself.

Just my two cents, if it helpsā€¦

Yes, donā€™t button events run no matter what? Per this threadā€¦ http://inductiveautomation.com/forum/viewtopic.php?f=63&t=6078&p=16628&hilit=button+disabled#p16628

Any button I have that uses the enabled property has scripting behind it. I donā€™t know how to take advantage of the enabled property otherwise.

Yeah, I remember that now. Thanks!

So youā€™d need to put in something like:

if event.source.enabled do this do that do the other...
to be able to use the enabled property. Seems a bit counter-intuitiveā€¦

Anyway, Iā€™d say that goes a long way to root causeā€¦

For IA tech here is a screen shot today. We got one last night. I have to look at the other info presented here, only had one coffee and am going :scratch:


Step7 and Jordancclark,

I canā€™t view that forumā€¦ Guess I donā€™t have enough feathersā€¦ Hehe

Sorry, didnā€™t notice that. The gist of it is in this quote from the thread:

ā€œThe event handling code runs whether or not a component is enabled. In your logic for the event handler you should check to see if itā€™s enabled or disabled and branch from there.ā€

As Jordan mentioned, the script behind the buton has to explicitly evaluate the enabled condition if you are using that property. Otherwise, I think the only thing it does is make the button look greyed out.

And again, for troubleshooting, be liberal with print statements and turn java logging on. This canā€™t be stressed enough, in my humble opinion.

[quote=ā€œAxisItā€]Step7 and Jordancclark,

I canā€™t view that forumā€¦ Guess I donā€™t have enough feathersā€¦ Hehe[/quote]

Try this linkā€¦

Just to avoid any confusion, only the mouse events continue to function when the component is disabled, and the reason they do so is explained in the referenced post from above.

The actionPerformed event (which is where the current script in question is located) will not fire when the component is disabled unless you call a doClick() on the button from scripting.

This is why this problem is confusing. Iā€™ll continue to take a closer look and try to figure out whatā€™s happening.

Thanks, Dave.

Would checking for the enabled state at the beginning of the script be a possible workaround until a root cause is determined? At the very least, it shouldnā€™t hurt anything.

It may and it may not and it surely wouldnā€™t hurt anything, but there already is a workaround in place. There are no longer erroneous entries being written. Here we are merely logging any attempts to write that are occurring when we shouldnā€™t be writing and trying to figure out why these are happening.

Ok,

I have removed the binding on the enable of both buttons. I am now setting it with code from the Pin box. We will just have to see if this works better.

Do we have an ETA on when this ā€œFeatureā€ may be fixed?

I could send up the new project file if needed.

Go ahead and put up the new project just so we have the most recent version.

Unfortunately there is no way that we can have an ETA on a fix until we can figure out whatā€™s wrong and some way to consistently replicate it. Weā€™ll continue looking into it to see what could possibly be happening.

Well good news. I had no entryā€™s in the tbl_admin today.

I set the code to look if they are clocked in and then enable/disable buttons. If they did manage to get punched in twice it would write to the tbl_admin table and then clock them out of both.

I removed the code from the enable on the buttons to the property change on the Pin box.
BDI_Time_Clock (2011-05-04).proj (68.1 KB)

All is still good :smiley:

Another good morning, no errors.

Yet another good day.

Well I think we can say the issue is linked to the enabled feature on a component anyways.