I'm writing an application that uses the Root GUI classes, TG*, and I'm using Root 2.23/12 on a machine running Red Hat 6.1. I have one window where a button performs a long computation and then deletes the window itself. I have found that if I place another window over certain widgets while the computation is running (so that they need to be redrawn), then I get errors like the following when the window tries to delete itself: Error in <RootX11ErrorHandler>: BadDrawable (invalid Pixmap or Window parameter) (XID: 54526074) It seels that what's causing this problem are two TGLabel objects. I never need them after I put them in the window, so I didn't bother to keep a pointer to them. Do I need, instead, to keep a pointer to every GUI object I create and then delete them in a particular order? Also, what is the memory management paradigm for these classes? Looking at the guitest.cxx example, it seems that I only have to give names to object I need to access later (TGTextEntry objects for instance, where I need to call GetText() to get the string a user entered). I assume, then, that when I create a widget and add it to a window, the window then frees the widget's memory when the window is destroyed. Is this correct? I've attached the offending code, stripped of unimportant details. The main part I've left intact is the object construction/destruction. Thanks! Greg
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET