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

OnComboClick Event causing glitch with SAVEWARN

I have an edit line mapped to the key in a form and it is subclassed with a ComboDropDown button. I have in my OnComboClick event code to send the READ event to update the form to the Key that is chosen in the combo drop down. It works as expected, except in the case where there are changes made to the record and not saved. The SAVEWARN parameter causes a message to ask if the user would like to save changes, as expected, but the problem is that when you click "OK" to save the changes, it immediately shows the message again. In troubleshooting it further, I found that it is not firing any other events between the two messages. The second message is the only one that will affect the changes, so if I were to click "OK" on the first message and then "CANCEL" on the second message, the record would not be saved. When I type in the key (instead of picking it from the ComboDropDown) the double save warning message glitch does not occur.

I have followed the code in the debugger and have found that there appears to be no events fired between the double message.

Any help on this would be appreciated.

Comments

  • Dan,

    I think this is a red herring with regard to linking this to the OnComboClick event. You can duplicate this exact behavior if you never left the edit line control and triggered a menu to send the READ event to the form. This is really an OpenInsight issue. The reason you are experiencing this with the OnComboClick event is because clicking on the subclass dropdown button does not cause the focus to leave the control. This is why your experiment in typing the key, and leaving the edit line, is not exactly the same.

    Your best bet is to check the SAVEWARN property of the form ASAP. If the value is 1 then you can handle the save warning message yourself and respond accordingly. If you are unfamiliar with this property, it gets set to 1 automatically by OI when a data change is made in the form. However, you can set this to 0 if you want to force OI to suppress the save warn message.
  • Great - I'm glad to hear it is a known issue with OI. Thank you for the suggestion on how to address it. :-D
Sign In or Register to comment.