Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Closing Child in MDI/WCI  (Read 13710 times)
Jeff W.
Posts: 31


« on: May 10, 2010, 08:00:56 pm »

Is there a way to close a child program, if one or more are open, when a user clicks the close button on the parent container?
.
Four Js
Posts: 115


« Reply #1 on: May 12, 2010, 12:15:47 pm »

There is currently no way.
The reason is that child programs are separate programs, which can live their life independently of the parent container, and the container knows nothing about the children state.

Maybe the container could send an interrupt to the children, but our recommendation is to use ui.Interface.getChildCount() to check if there are children and to display a message so the user closes correctly each running child.
Sebastien F.
Four Js
Posts: 509


« Reply #2 on: May 12, 2010, 04:18:13 pm »

I second PN...

MDI child windows are independent programs that can run/process concurrently.

If we want to provide a way to close by program all child apps from the parent MDI, we need a clear process to handle closing with answer from the children (what if one does not want to / cannot close? => error message to parent)...

What about sending a GUI window "close" event to all child windows when the parent MDI window is closed?
=> Simulate what the user would do by hand....
Is this done today?

Seb
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines