09-26-2018, 04:30 PM
I just solved what I hope is the last issue in the conversion of my massive IW 14 app to IW 15.
I had one screen where I allow the user to set a wide array of filters, then I build the WHERE clause and open the query (FireDAC) in a regular Click event on a TIWButton.
It worked great in IW 14. But in IW 15 I would set the parameters, click Search -- and nothing would show up. I quickly learned that if I clicked the button twice, data would show up.
Very odd.
Just today I tracked it down to the code in OnRender that checks for (not IsPostBack) before initializing the adapter for my ORM. Somehow after a click IsPostBack is NOT True on the first PostBack. This led to my adapter being created again, overwriting the first one and closing my query.
I changed my code to use IsFirstRequest, and it works fine now.
But I think y'all oughtta take a look at IsPostBack in IW 15 in Delphi 10 Seattle -- something's wrong.
I had one screen where I allow the user to set a wide array of filters, then I build the WHERE clause and open the query (FireDAC) in a regular Click event on a TIWButton.
It worked great in IW 14. But in IW 15 I would set the parameters, click Search -- and nothing would show up. I quickly learned that if I clicked the button twice, data would show up.
Very odd.
Just today I tracked it down to the code in OnRender that checks for (not IsPostBack) before initializing the adapter for my ORM. Somehow after a click IsPostBack is NOT True on the first PostBack. This led to my adapter being created again, overwriting the first one and closing my query.
I changed my code to use IsFirstRequest, and it works fine now.
But I think y'all oughtta take a look at IsPostBack in IW 15 in Delphi 10 Seattle -- something's wrong.