BrianYao

Buttons Sticking

Recommended Posts

Hi. I'm getting a weird bug in DAQFactory where after I generate a report, the mouse does not work correctly.

When I left click on a button or variable value, the mouse down occurs but gets stuck and doesn't go back up when I let go of left click. The action is not performed. If I move the mouse away from the button or variable value while it is stuck on the mouse down, it will goes back up but the action is not performed. My buttons that have a mouse up and mouse down action work fine (except that I have to move my mouse away from the button for the mouse up rather than just letting go of left click). Also, if I use the control button to highlight a group of objects while this bug is happening, the highlight box never goes away and will move with my mouse (as if the left click is stuck on mouse down).

One workaround I found was that if I left click on a button while holding control to select it, I can then right click on it to select the "Do Action" tab to use the button but this only works in developer mode. Also, in any popups opened using the workaround, clicking buttons and variable values work fine. However, if I exit out of the popup, the bug continues to occur.

The button that generates a report uses a quick sequence with the following code-

page.capture("Example",Example_filepath+ ".jpeg",900,950)

delay(0.5)

component.Example_repport.LoadJPEG(Example_filepath + ".jpeg")

page.Example_Report.PopupModeless()

page.Example_Report_Generate.ClosePopup()

For some context, the button that generates the report is on the Example_Report_Generate page, which is opened as a model popup by a previous button.

Share this post


Link to post
Share on other sites

I would try moving all the script into a sequence then using beginseq(mySequence) to start the sequence rather than have it run in the Action.  The problem with code in an Action is that it runs in the messaging loop of DAQFactory, and it seems you are doing something to throw that off-kilter.  Running it in its own sequence makes it so the messaging loop can continue without issue while the capture and subsequent code can run in the background.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now