Version: 1.4.0 (using KDE 3.5.9) Installed from: Compiled From Sources OS: Linux In the following code snippet: name="X Corr"; if (Kst.windows[name]) Kst.windows[name].close(); myWindow = new Window(name); myWindow.name=name; crossPowerPlot=new Plot(Kst.windows[1]); it is not always the case that the plot is added to the window. If the last line is changed to: crossPowerPlot=new Plot(myWindow); everything seems to work fine. Using crossPowerPlot=new Plot(Kst.windows[name]) causes the same problems.
The KMdiChildView::close() method ends up POSTing a KMdiViewCloseEvent to the application. As a result of this the window will be closed at some later time. What we really want to do is close the window immediately to avoid race conditions, so we should SEND the message instead.
SVN commit 784195 by arwalker: BUG:159095 From javaScript close a window immediately when requested, and not at some later time M +12 -1 bind_window.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=784195