application.closeFormDialog() problem in 3.5

Hello,

when calling application.closeFormDialog() while no form is actually shown in a dialog, I end up in the login form in 3.5. In older versions of Servoy this was simply “ignored”…

Can this be fixed? If not, I have to change all those occurences to

if (application.isFormInDialog()) { … }

Thanks
Patrick

Hi Patrick,

I had something similar happen to me on change to 3.5 which may just be a heads up to anyone else moving versions.

Since 3.5 and multiple windows, closing a form in dialogue (FID) has altered subtly as has the parameter to be passed to it.

It used to be either ‘true’ or ‘false’ or null to allow control of which stacked FID’s would be closed.

application.closeFormDialog(true)

It is now the title of the FID to be closed

application.closeFormDialog('my dialogue name')

I had a method which was called to close a FID that still contained an old 3.1 parameter of ‘true’ and so the initial FID was not being closed as Servoy could not identify the FID from the parameter passed.

That original FID was somehow held in a stack and was still there the next time I called another FID.

So performing the ‘closeFormDialog()’ just closed the newest FID and left the original stacked FID still showing.

After manually closing that remaining FID it did not reappear as it had been removed from the stack

The fix was to revisit the method which ran the closeFormDialog() function and remove the ‘true’ parameter which left it to close the default open FID.

application.closeFormDialog()

Hope this may help someone out there

Cheers
Harry

I understand the changes. What I don’t understand is why something like

application.closeFormDialog()

takes me to the login screen instead of just do nothing.

patrick: i will look at the closeFomDialog going to the login screen

Harry: Do you see that change in the final of 3.5? because we did delete a bit to much old functionality when introducing the new dialog system. But in the last RC’s and the final we tried to preserve as much of the old behavior as possible.

patric: fixed form 3.5.1 if you call it for the main application window nothing will happen anymore. (the method returns false)

Hi Johan,

Last tested in rc6 build 511

Will try using 3.5 final and let you know

Cheers
Harry