Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Missing clicks

Two issues which I suspect might be related.
I have an edittable that has as a first column a check box. All boxes are checked.
If I try to uncheck a given box, it doesn't always do so, I must move mouse around and click several times.
If same edittable window does not have focus clicking in the edittable does not give the window focus. Clicking elsewhere in the window does give the window focus.
This behavior is recent.
Any ideas?

Comments

  • edited October 2021
    It's caused by these lines of code
    Handle = Get_Property(@Window:".MDICLIENT", "HANDLE")
    Call Send_Message(@Window:".OLE_SUBCLASS", "OLE.Subclass", Handle, @Window:".MDICLIENT")
    Call Set_Property(@Window:".OLE_SUBCLASS", "OLE.MdiTheme[":@Window:";MDICLIENT]", MdiTheme)
    It occurs even if MdiTheme = ""

    Edit this might be incorrect, I'm testing.

    Edit 2, it's not those lines of code.
  • edited October 2021
    Something strange is going on.
    If above window has focus (MDI Child btw) and click on header of a different window that does not use the SRP edittable, a double click fires (window is maximized) not a single click to give focus.
    Edit it occurs with two windows both of which use the SRP edittable. The other window just must be also an MDI child.
  • The double-click issue has been around a long time. I've tried desperately to solve it, but I haven't been able to. For some reason, Window sends a WM_LBUTTONDBLCLK message to another window while the SRP EditTable has focus. I can't explain why so far.

    I'll look into the check box issue and get back to you.
  • Thank you, any workarounds you could suggest for double click issue?
  • I am having trouble recreating either of these issues in 4.1.19, especially if you are subclassing the MDICLIENT.
  • I am not subclassing the MDICLIENT, it's an option in my app, I turned off for testing this. The co-worker that reported the issue was subclassing the MDICLIENT.

    The two issues you are talking about are
    1. The buttons not unchecking.
    2. The window does not get focus when the editttable is clicked on but does get focus when you click elsewhere in the window.

    Correct?
  • I am using 4.1.19.13
  • I see, I was thrown off by your use of the term header. I thought you were clicking on the title bars of other MDI child windows. I can recreate the lack of focus change, so I'll look into that. I can't recreate the checkbox issue, though I should point out that to uncheck a checkbox, you must both click and release in the box. If you click while in the box but release outside the box, there is no change. This is standard windows click behavior.
  • I don't if this helps at all but I just clicked on several checkboxes in an edittable, the first few all got unchecked then I hit one that wouldn't uncheck, I clicked several times, these are the OLE events that fired.

    OnMouseEnter
    OnMouseExit
    OnMouseEnter
    OnGotFocus
    GotFocus
    OnCheckChanged
    OnCheckChanged
    OnCheckChanged
    OnCheckChanged
    OnCheckChanged
    OnCheckChanged
    OnCheckChanged
    OnClick
    OnClick
    OnClick
    OnClick
    OnClick
    OnClick
    OnClick
    OnClick
    OnDblClick
    OnMouseExit
    OnMouseEnter
    OnMouseExit
    OnLostFocus
    LostFocus
    OnMouseEnter
    OnMouseExit
    OnMouseEnter
  • The mouse was centered right in the middle of the checkbox.
  • edited October 2021
    Try out 4.1.20.11. This one resolves the focus issue. I still think the check box has to do with the mouse moving as you click. I noticed that if I try to quickly click several boxes, some of them don't respond because my mouse cursor is moving too much. To that end, I added a new flag to the CHB CellType that when set to 1 causes the checkbox to respond to the down-press of the button.

    If the check box issue persists, then there is something I'm lacking in my test environment to recreate this. Perhaps it is reacting more slowly due to event handling or something. I test in a clean OI with no promoted events.
  • edited October 2021
    This is a log of events from the edittable
    Event name followed by click position param1, the first few clicks work and I get a then OnCheckChanged, then they stop working and I get the OnClick event (note the position never changes, I was not moving the mouse at all).
    I am going to use your ButtonDown flag, so this is not urgent at all, I just wanted to let you know what I had discovered.
    Thanks again for the help.

    Edit: I don't think I was double clicking either.

    OnMouseEnter
    OnMouseExit
    OnMouseEnter
    OnMouseExit
    OnMouseEnter
    OnMouseExit
    OnMouseEnter
    OnMouseExit
    OnMouseEnter
    OnGotFocus
    GotFocus
    OnCheckChanged
    2;1
    OnCheckChanged
    2;2
    OnCheckChanged
    2;3
    OnCheckChanged
    2;4
    OnCheckChanged
    2;5
    OnMouseExit
    OnMouseEnter
    OnClick
    2;11
    OnClick
    2;11
    OnDblClick
    2;11
    OnClick
    2;11
    OnDblClick
    2;11
    OnClick
    2;11
    OnDblClick
    2;11
    OnClick
    2;11
    OnDblClick
    2;11
    OnClick
    2;11
    OnMouseExit
    OnLostFocus
    LostFocus
    OnGotFocus
    OnLostFocus
  • So, I changed my code to look like this
    Call Set_Property(Obj, "OLE.CellType[2;1]","Check Box":@FM:0:@VM:0:@VM:1)
    This is what the events now look like and once you get to the OnClick the checkbox does not uncheck. I accidently did a DblClick in the middle.

    This is what I did from line one moving downward I unchecked each checkbox in turn, then I skipped a bunch then it stops working. I think the key to reproducing this is to skip a bunch of checkboxes.

    OnMouseEnter
    OnCheckChanged
    2;1
    OnGotFocus
    GotFocus
    OnCheckChanged
    2;2
    OnCheckChanged
    2;3
    OnCheckChanged
    2;4
    OnCheckChanged
    2;5
    OnCheckChanged
    2;12
    OnCheckChanged
    2;13
    OnCheckChanged
    2;14
    OnCheckChanged
    2;15
    OnCheckChanged
    2;16
    OnCheckChanged
    2;11
    OnCheckChanged
    2;10
    OnClick
    2;9
    OnClick
    2;9
    OnDblClick
    2;9
    OnMouseExit
    OnGotFocus
    GotFocus
    OnMouseEnter
    OnClick
    2;9
    OnClick
    2;9
    OnClick
    2;9
    OnClick
    2;9
    OnMouseExit
    OnLostFocus
    LostFocus
    OnGotFocus
    OnLostFocus

  • I'm really sorry, but this is still not recreating for me. I have a table with 100 rows and I've clicked dozens of times, all over the place, skipping, scrolling around, clicking some more. It always works. Do you have business logic executing on any of these events at all? If so, try disabling events to see if it still occurs.

    I suspect this is environmental, and if that's the case, the fastest way for me to isolate the issue is to recreate your environment. Some people will email me a link to download a copy of their OI system, which I am open to doing if you are.
  • Let me see what I can send you.
  • This is what I will do, it will have to be tomorrow, I have a meeting for the rest of today. I will send a link to an install of the software and some data and instructions on how to set it up via email.
  • I sent you an email.
Sign In or Register to comment.