07-27-2009 03:18 PM
I have a couple of Configuration Entry Points that I've setup with Entry Point Enabled Expressions. They're setup as (StationGlobals.Status.ItemRunning == False) && CurrentUserHasPrivilege("CanRunItem") where CanRunItem is a custom user privilege. This works exactly like I want it to for the menu item entry points, they're grayed out when that subroutine launches and don't re-enable until after it finishes (I set the StationGlobals.Status.ItemRunning to True upon entering and turn it off when exiting).
Also, the ActiveX entry point buttons are grayed out and disabled like I want them to be on a purely user privilege level when I execute a login. However, the entry points do not gray out when the Status.ItemRunning boolean goes true though the menu items do (again, in the full OI).
Does anyone have a clue where the callback is to update the status of the entry point buttons or if there's something else I need to do to get these to update?
Thanks,
Mike
Sidenote: I had an issue with a -17306 error when I tried using the expression CurrentUserHasPrivilege("stuff") && StationGlobals.Status.ConfigIsRunning == False. It kept saying StationGlobals.Status could not be found. One of either reversing those two and/or wrapping the SG.Status...==True in parenthesis fixed it. Not sure which since I did both at the same time and I haven't tried to track it all the way down. Odd thing is it worked fine in SeqEdit, and the error got thrown only in the customized OI when it went to rebuild the menu trees.
07-28-2009 04:37 PM
My prior post was a bit rambling, but just for future reference, I did get a solution from NI support.
The key is ApplicationMgr.RefreshAllViewMgrs. Calling that gets my buttons to update their activation state just as I wanted.