Four Js Development Tools Forum

Discussions by product => GDC => Topic started by: Jeff W. on May 10, 2010, 08:00:56 pm



Title: Closing Child in MDI/WCI
Post by: Jeff W. 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?


Title: Re: Closing Child in MDI/WCI
Post by: . 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.


Title: Re: Closing Child in MDI/WCI
Post by: Sebastien F. 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