closing windows & methods

Hi,

Very handy, the new OnOpen and OnClose methods for the application. I’ve got a couple of questions though.

In my solution I create buttons to control the flow through the application. I mean to open and close formdialogs (popups/windows etc). Now, all of these formdialogs have the “windows” X in the upper right corner, allowing the user to close the window. Now, to that specific “button” you cannot attach a method. You have the OnHide property, but any method attached to that will also be triggered when the user closed the window through the button and attached method I put in my application. Now, you can prevent this by adding a sort of procescontrol global, but that is not very neat, I think.

Secondly, pressing the X is final. As far as I understand it’s not possible to show a dialog, asking the user if he really wants to close the formdialog.

I think it would be very handy to be able to attach methods to these X buttons, with the option to return to the window as if the X button was not pressed.

I hope this whole story makes sense..

Paul

Hi,

We’ll look into it and see if we can add this feature to the next release…

Greetings,
Sebastiaan van Erk

It appears from the Developer User’s Guide pg169 that when you show a form in a dialog, you can use an on Hide method to prevent the dialog from closing if the user clicks the close box (x).

I’m wondering if you can also prevent the plugins.dialogs (showErrorDialog, showInfoDialog, etc) from closing if the user clicks the close box (x). I’ve done some searching in the forum and the docs and can’t find the answer yet.

Hi Tara,

Check out: onHide - Classic Servoy - Servoy Community

Hope this helps.