08-15-2016 06:42 AM - edited 08-15-2016 06:45 AM
Hi guys, let me tell you what i am working on. I have four page (tab control). When i run the code, firstly a log in screen comes, i enter the username and password then an upload button comes, i press the button then uploading animation plays and finally at the fourt page real animation plays. But the problem is that when i enter an invalid password or username, it passes second page too. I dont want it. I want to call page 1 which contains login screen, If i enter an invalid value. Whenever i enter the right values then it must pass to the second part.
Solved! Go to Solution.
08-15-2016 06:48 AM
Hello Omnom,
To answer your question, the reason it is going to tab 2 is because after that sequence in the flat sequence structure has executed (correct OR incorrect password) it will move on to frame 2 of the sequence. To fix this, you could put a while loop around frame 1 with your pop up and exit the while loop only on condition of correct password or error.. To better achitect your solution, I'd recommend you use a State Machine, you can find a link to make it here, sequence structures I pretty much only use for benchmarking and timing, not to control data flow..
08-15-2016 06:59 AM
Hello Chris, I thank you for help. i already tried to put while loop but i took different errors like not passing second page.
08-15-2016 07:05 AM
Please post your code with the While Loop and errors.
08-15-2016 07:17 AM
Here is the one of them.
08-15-2016 08:12 AM
So I'm going to repeat what I said before, it's much easier to do this within a state machine, that way you can enqueue whichever state you want next within the previous state. Also, you need to exit the while loop programmatically, currently you have the first frame exiting the while loop after one single iteration, so if they hit cancel or wrong username/password, it will go to frame 2 and not go into the while loop..
08-15-2016 11:22 PM
Try to use state machine which will most likely help you to take decision based on your input to the state selection and you just need only one event structure with many events as you wish.
Better way of coding is to avoid sequence structure whenever you can do a logic without using sequence structure.
08-15-2016 11:58 PM
Please find the attached rough code which will make you to understand simple