Hello, I want the User to click in a Canvas before I clean up my class’ resources. Therefore I wrote the following code:
~TMyClassImpl()
{
if (leaveopen_) {
try {
auto_ptr<TCanvas> clickme ( new TCanvas("clickme", "clickme", -200,200,300,140));
TText t(0.1,0.5,"Double click or press a key.");
t.Draw();
clickme->cd();
clickme->WaitPrimitive();
}
}
catch (...) {}
}
/* clean up resources */
}
The program did not wait for the clicks so I put in the example code from root.cern.ch/root/html514/TPad.h … tPrimitive
getting the following output:
Loop i=30, found objIsA=TText, name=
- over 50 times. Is there a way to get WaitPrimitive() to ignore the former Insertion of the TText and wait for the double-click or pressed key as intended? (I am using root 5.14)