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