Page 1 of 1

onHide not triggered when closing main window

PostPosted: Mon Aug 25, 2014 1:44 am
by justink
Hi,

I'm using Servoy version: 7.4.1 - build 2028

I'm trying to trigger the onHide function in the main window but when I set a breakpoint in the smart client it doesn't trigger. I does trigger when closing the child windows but never for the main window. I have set a breakpoiont in the base form and also tried overriding the function in the main form and setting a breakpoint or returning false but still no luck...it doesn't appear to ever get called.

Any help appreciated.

Re: onHide not triggered when closing main window

PostPosted: Mon Aug 25, 2014 11:13 am
by ROCLASI
Hi,

Do realize that onHide is a form event and not a window/dialog event. So they are not only triggered when you close a window/dialog but also when you switch forms in dialogs/windows.
Having said that, when you close the main window you in fact close the whole solution. I guess because you are closing the solution Servoy doesnt bother to trigger any onHide events.
If you need to handle things just before you close the solution you can use the onClose event for this (see properties on the main solution node).

Hope this helps.

Re: onHide not triggered when closing main window

PostPosted: Wed Aug 27, 2014 4:31 am
by justink
That's just what I needed.

Thanks.