[ROOT] Closing a TGFrame.

From: Brett Viren (bv@bnl.gov)
Date: Wed Oct 17 2001 - 17:07:33 MEST


Hi Rooters,

I am trying to understand how TGMainFrame derived windows are supposed
to be correctly closed.

What I have is a TGMainFrame which has various sub frames including
TRootEmbeddedCanvases, some of which hold TPad derived classes as well
as regular TPad and an assortment of custom and standard graphical
TObjects.  This TGMainFrame is spawned from a custom main which
creates the TRint, provides the ROOT prompt and is expected to keep on
running after the TGMainFrame is closed.  This is all with compiled
classes, not interpreted.

Currently, in response to a TGButton's Clicked() signal I call
TGMainFrame::CloseWindow() on the TGMainFrame derived object and then
delete the object.  This works, but then any <enter>s given to the
ROOT prompt causes the ubiquitous BadWindow/BadPixmap X errors.

This is with 3.01/06 28 August 2001 on x86 Linux, g++ 2.95, X4.1.0.

Any help is appreciated,

-Brett.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:03 MET