I have assigned a few variables to request user input by entering in an integer or pressing yes/no. I am having trouble with these popping up twice. The question will pop up, wait for user input, then immediately pop up again. It seems that the variables that ask for an integer ignore the input of the second popup up but the ones that require a yes/no will overwrite on the second pop up. For example, if I were to enter 10 the first time it would accept and keep the initial value of 10 despite what I enter for the second pop up. On the contrary, if I were to enter yes the first time and no the second, the program keeps the no value. I am unsure as to why this is happening. Is this a common issue?
I haven’t seen that behavior before. Can you share your program or at least a screen shot? Also, which version of Polyscope are you using?
Attached below is some of the code, I left out the "Switch boardType" as it was long and contained positions for variables. Specifically, I encounter the double pop up problem when the user needs to chose the type of board and the desired function. The program is supposed to trigger an error if the boardType number is not between 1 and 4 - which it does but only on the first pop up. I can enter any number on the second pop up. For the boolean questions, i have found that when it asks for the retorque, regardless of if I choose "yes" or "no" it asks if I want to install screws. Instead, it should perform the retorque protocols. Loop verifyAll≟ False Select Board Type Loop checkBoard≟ False boardType≔'Please select a board type:' 'If board type chosen is valid, the screw location of the board type will be assigned in the switch function.' If (boardType≤4) and (boardType≥1) 'Each case has the same structure but the screw location is different.' Switch boardType 'Within the switch, numerous positions are assigned to other variables, these are left out for ease of reading' Else Popup checkBoard≔ False Choose Screw Action 'This will ask the user to determine the desired function' retorque≔'Is this a post-lam retorque?' If retorque≟ True Set Switch_Program=On screwTypeStr≔"POST-LAM RETORQUE for" Else Set Switch_Program=Off tightening≔'Are you installing screws?' If tightening≟ True screwTypeStr≔"INSTALL SCREW to" Else screwTypeStr≔"REMOVE SCREWS from" Enter Number of Boards 'This will ask the user to determine the number of boards.' numBoards≔'Enter the number of boards.' Loop (numBoards>10) or (numBoards<1) 'This loop will ensure that the user input is between 1 and 10' Popup numBoards≔'Enter the number of boards.' numBoardsStr≔to_str(numBoards)Let me know if you have any other questions.
I don’t see anything in the pseudo code that would cause me to see this behavior. If you’d like to send me the program, I’ll run it on my simulator and let you know why I see. You can either post it here or email me at mbush@hirebotics.com.
I have assigned a few variables to request user input by entering in an integer or pressing yes/no. I am having trouble with these popping up twice. The question will pop up, wait for user input, then immediately pop up again. It seems that the variables that ask for an integer ignore the input of the second popup up but the ones that require a yes/no will overwrite on the second pop up. For example, if I were to enter 10 the first time it would accept and keep the initial value of 10 despite what I enter for the second pop up. On the contrary, if I were to enter yes the first time and no the second, the program keeps the no value. I am unsure as to why this is happening. Is this a common issue?