![]() |
|
IW15.0.14 error/change creating forms - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: IW15.0.14 error/change creating forms (/thread-756.html) |
IW15.0.14 error/change creating forms - jeroen.rottink - 10-20-2018 Hi, I updated from IW15.0.13 to IW15.0.14 and saw the following error. My application uses cookies to support autologin. The first form, TDlgLogin, checks a cookie and if it's ok, bypasses the login form by creating the next application form. In IW15.0.14 the TDlgLogin form is showed instead of the next application form. Very simplified the testcase is this: Code: typeThis testcase doesn't show TIWForm2 in IW15.0.14 while it does work in IW15.0.13 Using Delphi 10.1 Berlin RE: IW15.0.14 error/change creating forms - Alexandre Machado - 10-23-2018 Yes, in fact it worked but I'm not sure it should. This is an anti-pattern: create and show another form and, more specifically, releasing the form inside the its OnCreate event. The recommended way of doing it would be through TIWServerController.OnGetMainForm event. RE: IW15.0.14 error/change creating forms - jeroen.rottink - 10-23-2018 Hi Alexandre, I use the event TIWServerController.OnGetMainForm already to present a login form. Depending on the configuration and client IP address, the user is presented with a standard username/password login or one where a one-time password is generated and sent by sms. Only the standard login form has support for auto login by using a cookie. Probably that was the reason to put the auto login logic in the TDlgLogin.Create. Isn't calling TIWForm.Release only to 'hide and mark the form to be released'? I'll adapt the TIWServerController.OnGetMainForm code. Thanks for the answer. |