Using showFormInDialog

Hello,

I expected showFormInDialog() would behave in a way, which it doesn’t.
So I would like to know how I should use it in a way I like it to work.
See the following code. This code is in a method, which has been called by another method:

application.showFormInDialog(forms[_selection_form], -1, -1, (application.getScreenWidth() - 200), (application.getScreenHeight() - 200),'', true, false, '', true )



//Show the specified form in a modal dialog, on default location and size (x,y,w,h)
//application.showFormInDialog(forms.contacts);
//Note: No code is executed after the showFormInDialog until the dialog is closed if it is created as a modal dialog.
//Show the specified form in a non-modal dialog with a specified name, on default location and size (x,y,w,h)
//application.showFormInDialog(forms.contacts,'contactsdialog',false);
//Show the specified form in a modal dialog, at a specified location and size with custom title, not resizable but with text toolbar, 
//application.showFormInDialog(forms.contacts,100,80,500,300,'my own dialog title',false,true,'mydialog',true);

var _var = globals.variable_from_form_in_dialog

I thought that the last parameter means modal form. I thought that this meant that the process is given to this form and the rest of the method where it is called from, would be stopped until this form has been closed. That is the behavior that I need.

But I see that the form is being shown, but the methods continue doing the script until the end of the method script.

I don’t want that, because on the form that is shown, some variabele will be set, which I need in the rest of the script.

I also tried that last parameter false, but that doesn’t help neither.

Am I interpreting that last parameter not correct? If that is the case, how can I succeed to stop a method processing until the form that is called by showFormInDialog() is being closed.

I’m using Servoy 3.5 Final

Martin

Your quotes are wrong. (around the booleans) You have to give your window a name.
Please look carefull at the example. (i cant give you an example right now. I’m typing this on my mobile phone :-) )

I don’t see a wrong parameter.
I checked some true/false settings about resize and text toolbar and that worked. So the parameters don’t seem wrong to me

The quotes in your code still looks strange to me, but oke.
Do you have the debugger on? Because if you have, to code is also not stopping. (after you showFormInDialog)

yes indeed I was testing with the debugger on.
Why doesn’t behave the same way in debugmode?

The quotes are correct imho.

Why doesn’t behave the same way in debugmode?

That has to do with the design of the debugger I guess and is just the way it is right now.
Maybe this will be different with Servoy 4.0.