JSOP posted
this[
^] Tip/Trick about a clean way to show a login form. Basically it's a simple pattern for handling the login process in
Main
before showing the main form. With a little restructuring you can maintain the separation of responsibilities of the main and login forms in your app and in the process eliminate the awkward synchronization between them.
If the login form is responsible for
* offering the option to exit completely
* gathering user login info
* validating the info
* if invalid info is entered stay open and ask them again
then
Main
can use it to wait until the user enters valid login info or the user decides to give up trying to remember their forgotten password. If what they enter is valid then
Main
can pass the user's information to the main form when it instantiates and runs it.