Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 17 JUL 2008 04:21:20PM Steve Botes wrote:

The main window in our application is a window with an MDI frame. Several of the child windows are started from the menu with the function Start_Window( 'NAMEOFWIN', @Window, "", "", "")

When the parent window closes any child windows that were started get immediately closed and the CLOSE events on the child windows never execute.

What is the proper way to allow the CLOSE event on the child windows to execute when the CLOSE event occurs on the parent window (i.e. ALT+F4 or the system close command)?


At 17 JUL 2008 06:08PM dbakke@srpcs.com's Don Bakke wrote:

Steve,

The main window in our application is a window with an MDI frame. Several of the child windows are started from the menu with the function Start_Window( 'NAMEOFWIN', @Window, "", "", "")

So I take it that these aren't launched as MDIChild windows. Otherwise you would be using the Start_MDIChild function.

When the parent window closes any child windows that were started get immediately closed and the CLOSE events on the child windows never execute.

This does seem to be the case when calling windows using the Start_Window function.

What is the proper way to allow the CLOSE event on the child windows to execute when the CLOSE event occurs on the parent window (i.e. ALT+F4 or the system close command)?

What we have done is to put code in the CLOSE (pre-system) event of the parent (or MDIFrame) window that uses the OBJECTLIST service to find all running windows. We then loop through this list and attempt to close each window programmatically. If for some reason this gets aborted, then we stop the current CLOSE event from continuing so the the parent window won't close.

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 23 JUL 2008 03:05PM Steve Botes wrote:

Thank you for the response, I thought this might be the way to do it but wanted to check if there was a method in OpenInsight for handling this situation.

How do you abort the CLOSE event of the application parent MDI window if one of the child windows wants to abort the close? Do you have a pre-close event that executes and tries to close the windows before the MDI window CLOSE event?


At 24 JUL 2008 05:20PM dbakke@srpcs.com's Don Bakke wrote:

Steve,

Yes, as I mentioned in my previous response, we use the pre-system CLOSE event. We handle this all through promoted events. Otherwise, this would be done with the CLOSE script event handler of the MDI Frame. If any of the child windows can't be closed, then return a 0 and the parent window stays running.

dbakke@srpcs.com

SRP Computer Solutions, Inc.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/dc47abae8d33c13c85257489006fd148.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1