#Dialog5 closes automatically when hitting the submit button

1 messages · Page 1 of 1 (latest)

ebon beacon
#

i have a macro called "inputFailure". I call this if someone makes invalid inputs. This macro prints an error-message and calls assert(), which also used to stop the calling macro. I now mentioned that the script still continues executing. Is this like it should behave now or a bug? And how do i fix my code?

spare minnow
#

Would need to see your code, especially the condition for the assert. If simply assert(0,"message",0) and it's not stopping execution, that would be a problem.

ebon beacon
#

[h: assert(0, output, 0)]

#

Thats the last line of inputFailure

#

I added some broadcasts and its now working...

#

Im still sure there is something suspicious going on.

#

Ok i think i found it. It seems like the submit-button in a dialog5 seems to auto-close the dialog. I changed from dialog to dialog5 a few days before and concluded that the script was still executing [h: closeDialog("...")].

#

I withdraw anything i says about assert().

#

my second question is still up to date. I don't want my dialog to close when the user enters invalid data. Can i somehow prevent that?

#

Dialog5 closes automatically when hitting the submit button

spare minnow
#

Dialogs don't typically close on their own. Remove the closeDialog() reference?

#

input() does close when submitted because it's a modal window. Just making sure were not mixing things up with that.

ebon beacon
#

The problem is that i set the input of the dialog5 to true. I wanted to prevent the close button on the bottom of the dialog.

#

Is it possible to hide this button without autoclosing on submit?

spare minnow
#

You can remove the close button by setting closebutton=0; in the dialog5 roll option. But, this doesn't prevent it from being closed, even if you remove the frame. Hitting escape will exit the frame.

#

If you're saying, if the button isn't there submitting a form in a frame closes the frame, then I would call that a bug.

#

Oh, I see. There's also the input=0 option. That should prevent it from closing on submit and closebutton=0 will get rid of button, I assume.

ebon beacon
#

setting closebutton to 0 instead of setting input to 1 does exactly what i wanted.

#

Thanks for your help and sorry for missblaming assert() at first.