Bug 159095 - Plots created using javaScript are not always added to window
Summary: Plots created using javaScript are not always added to window
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.4.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-10 21:58 UTC by Andrew Walker
Modified: 2008-03-10 22:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2008-03-10 21:58:16 UTC
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.
Comment 1 Andrew Walker 2008-03-10 22:00:15 UTC
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.
Comment 2 Andrew Walker 2008-03-10 22:01:57 UTC
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