Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Browser back button
#6
I suggest that you refactor your application and change your form creation code... something like this:

WebApplication->ShowForm(TIWForm1, false, true); // in c++

TIWApplication.ShowForm() method has 3 parameters (the last 2 are optional)

First parameter is the Class of the form
Second parameter (AReleaseActiveForm: boolean), when true, the "old" form will be released when the "new" form becomes active. Default is false
Third parameter (AUseExistingInstance: boolean), when true, any existing instance of the same class of the desired form will be used. Default is false.

When you call it like

WebApplication->ShowForm(TIWForm1, false, true);

IW will create a new TIWForm1 instance and make it active (not releasing the old one) but if there is already an instance created, it will be used instead. This code guarantees that no 2 instances of any form class will ever exist (as long as you use this same method everywhere, instead of creating the forms via traditional code)

It will handle nicely all these cases that you are referring to

Handling the navigation between forms, including the back button events, is sometimes hard to get right. I'll check your updated example and propose a few modifications to handle it better, if that's the case.

Kind regards
Reply


Messages In This Thread
Browser back button - by JuergenS - 04-26-2022, 11:02 AM
RE: Browser back button - by JuergenS - 05-01-2022, 05:26 AM
RE: Browser back button - by Alexandre Machado - 05-01-2022, 10:31 PM
RE: Browser back button - by Alexandre Machado - 05-02-2022, 09:32 AM
RE: Browser back button - by JuergenS - 05-03-2022, 05:00 AM
RE: Browser back button - by Alexandre Machado - 05-04-2022, 12:13 AM
RE: Browser back button - by JuergenS - 05-04-2022, 11:18 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)