Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CheckActiveFormInSync showing wrong form
I am developing an application with several forms (with inheritance) containing several Frames (with inheritance). On the forms (and sometimes on a frame) I have buttons which should open the next form. Simply by filling some data in the next form and then using the .show of that next form. The same way I use buttons on a "deeper" form to return to the previous one by doing a callback to the previous form to transfer the data (with my own OnFinished procedure) and then close the form with a .hide. Most of the times that works fine. 

Sometimes however I need to click again after the first click on the open/close button. That would not be a big problem if not all the data I entered in edit fields was removed. After the first click, I found out, the current form (which I'm trying to leave) is fully rebuilt because of something called "CheckActiveFormInSync".

I tried to simpify the problem in a demo without the hassle of the inheritance and data transfer to and from the form. I think I found behaviour that very much resembles my problem. I think it has the same basis. 

I have a demo which creates two forms (in the demo I have a frame as well; it has the same problem as the form). From the first form I open the second form by clicking the button. The second form has a memo with an async KeyUpEvent doiing effectively nothing (but it is called). When I do nothing in the second form and press F5 te refresh, the second form is shown again (as expected). When I enter one or more characters in the memo (thus calling the async event) and then press F5, I am suddenly back in Form1, I think because of CheckActiveFormInSync.... It is in the calling stack of the OnOpen event of Form1. When I remove the async event from the memo an F5 does what it should do; refresh form 2

Delphi 10.3 with update 2
Intraweb 15.1.20

Attached Files
.zip (Size: 61.64 KB / Downloads: 1)

Messages In This Thread
CheckActiveFormInSync showing wrong form - by gerritschurer - 05-25-2020, 08:18 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)