Recently, I was contracted by a user of the name Flame Sage to create a fully functional textbox system (complete with menus and whatnot) for his DW3 project. I was going right along and found a point where it became proper to create a function to back out of a textbox. I finished this and tried it out when I realized that I totally screwed up. Previously, I had a logic flow like this:
Create menu
When ready:
Create another menu
... do more stuff
Well, when someone backs out of a menu it just keeps trying to go on and I hadn't even thought about that. After much thought about the problem and trying to find alternatives, I have yet to think of a proper alternative to my problem of needing to take a few steps back in the logic. The nested dialogs get so complicated that a while() loop starting AFTER each box is created and before I do the proper stuff to wait until it's ready would get so confusing that it's not even funny.
I just ran into this about ten minutes ago. My mind is still blown.