We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
I'm new to this and hope someone could help me. :) I made a pop-up window. If I press the 'OK' button without entering anything, the sketch window will get stuck. I have to press the 'RUN' button to run it again. But I need it to be that if I press the 'OK' button without entering anything, there will be no change. Is that possible?
Thanks in advance!
Answers
I dn't see why not it depends on you what you do with the information from the dialog box. In other words the reason the sketch gets stuck is almost certainly to do with your code. Perhaps you can post a simple code example demonstrating the problem.
it is hard to tell
does the code crash? do you get an error message? in the ide?
which one?
when you are receiving a String from the pop up and you use it and it is empty this can happen
try check it before using it:
;-)
I think I found the problem. I want it to show the first letter of what I put in the dialog box. So I writed: text(newS.charAt(0),mouseX,mouseY); However if I enter nothing in the dialog box, there is no newS.charAt(0). How can I solve this problem? Thanks
solve it with what I just posted
e.g. when it's empty give it the value
"x"
then use
text(newS.charAt(0),mouseX,mouseY);
I've solved it. Thank you guys!!:D
great!