Recurring (repeated) calls to showFormInDialogue

There’s a note in the docs about showFormInDialogue. As I read it, it infers there’s no need to call for application.closeFormDialog() just ahead of making a call to display a second FID. If true, that would be welcome.

I’ve set the last argument for displaying the FID to both true and false. Same results. I’ve discovered one must indeed close one FID before displaying a second.

Am I misreading this note? What am I misunderstanding?

Nope - don’t have to close one form in dialog to show another. Just call “application.showFormInDialog(…)” again. It will open another form ON TOP OF the one currently open.

That’s why we have a “[closeall]” option when you close the form in dialog. TRUE will close all forms in the dialog, FALSE will only close the top one - and will show the one on the bottom.

bcusick:
Nope - don’t have to close one form in dialog to show another. Just call “application.showFormInDialog(…)” again. It will open another form ON TOP OF the one currently open.

That’s why we have a “[closeall]” option when you close the form in dialog. TRUE will close all forms in the dialog, FALSE will only close the top one - and will show the one on the bottom.

Excellent!

What was fouling my nest was a routine to block the dialogue’s close button (the top right X on Windows, the top left red button on Mac). By setting the global to enable the window to close, then calling the FID and then finally resetting the global to block, the routine finally works as advertised.

Thanks.

But you have to be very carefully!!
The second formInDialog is NOT modal.

for example if you have a method:

blabla
application.showformInDialog(…
//do something else after that, no matter what
globals.test = 0

with the first formIndialog the code waits until the formIndialog is closed and than does: globals.test = 0

but if you do this on top of another formInDialog (so the second) the code: globals.test = 0 is fired directly after you opened the formInDialog.

This is discussed, many times before, but still find it very annoying behaviour and hope the dev-team will find a solution for this.

We have a lot of functionallity that waits for the formInDialog to close and than do something